-
-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add readonly class to SelectField #1148
Comments
Hey @niklasdahlheimer and thanks for the suggestion! Actually, |
Update: it looks like some themes (e.g., Bootstrap) have custom styles for |
I need to add custom text styling to readonly fields. For TextFields this works flawlessly with a selector like
because the readonly attribute is forwarded directly to the
<input>
element. However, for SelectFields the inner HTML element is<select>
. You probably did not forward it here because, according to the specification<select>
elements do not accept the readonly attribute.To respect the specification but still have an anchor for readonly select fields and support css selecting, it would be great if you could add a conditional
readonly
class to the outer div, similar to thedisabled
class, here:uniforms/packages/uniforms-semantic/src/SelectField.tsx
Line 51 in f19cdcb
PS: I only could speak for the semantic-ui package here, maybe this affects other packages too.
The text was updated successfully, but these errors were encountered: