I am using TextField component provided by Fluent UI in React wherein I am rendering a custom validation error message (JSX.Element).
<TextField
value={"ABC"}
onChange={(_, newValue: string | undefined) =>
onValueChange(newValue)}
errorMessage={item.validationError|| undefined}
/>;
The validation error (referred to as item.validationError
in above code) is a JSX element which makes use of the Stack component provided by Fluent UI. Pseudo code -
<Stack horizontal horizontalAlign="start">
<Stack.Item> {} </Stack.Item>
<Stack.Item> {} </Stack.Item>
</Stack>
For some reason, whenever validation error comes up, this error comes up in console -
It's not impacting the functionality in any way, but how can this error be removed and why is it coming ? I am suspecting this is because Stack is being used inside the TextField component and Stack internally uses div
whereas TextField uses p
tag.