TextField label issues with enableErrors
Description
Avoid hiding TextField label when field is invalid but enableErrors is false
Changelog
Fix issue with TextField's Label become hidden while field is invalid and enableErrors is false
Additional info
That works. When the field is not valid the label still becomes red. Is that what we want? I feel like it should not show any indication about the errors.
Using this:
<TextField label="Required" validate={'required'} showMandatoryIndication validationMessage={'required'} enableErrors={false} validateOnChange validationMessagePosition={TextField.validationMessagePositions.TOP}/>
Let's also confirm this behavior with Diana tomorrow
@NitzanWix take a look again, I made some fixes
Now the label disappears on error. I think its this line https://github.com/wix/react-native-ui-lib/blob/b193b801ef97c763c594ccc1f080b35962a25b4b/src/components/textField/Label.tsx#L26C3-L26C108
Snippet to reproduce
<TextField
validate={'required'}
label="Required"
showMandatoryIndication
validateOnChange
validationMessagePosition="top"
validationMessage={'this is required'}
enableErrors={false}
/>