smelte
smelte copied to clipboard
`persistentHint` and `error` conflict on `TextField`
Had to resort to this to make things work the way I think they should work by default:
<TextField label="Enter text you would like translated..."
bind:value={translation}
textarea
rows="9"
outlined
max-length={MAX_LENGTH}
hint={tooLong ? '' : `${remainingChars} characters remaining`}
error={tooLong}
required />
I would've preferred that persistentHint
with a hint
and an error
would result in hint being hidden when error
was true
and the error
being displayed. Would it be possible to have this behavior built in?
<TextField label="Enter text you would like translated..."
bind:value={translation}
textarea
rows="9"
outlined
max-length={MAX_LENGTH}
hint="{remainingChars} characters remaining"
persistentHint
error={tooLong}
required />
<TextField label="Enter text you would like translated..."
bind:value={translation}
textarea
rows="9"
outlined
max-length={MAX_LENGTH}
hint="{remainingChars} characters remaining"
persistentHint={true}
error={tooLong}
required />