-
-
Notifications
You must be signed in to change notification settings - Fork 241
Add readonly class to SelectField #1148
Copy link
Copy link
Open
Labels
Area: ThemeAffects some of the theme packagesAffects some of the theme packagesTheme: Semantic UIAffects the uniforms-semantic packageAffects the uniforms-semantic packageType: FeatureNew features and feature requestsNew features and feature requests
Milestone
Metadata
Metadata
Assignees
Labels
Area: ThemeAffects some of the theme packagesAffects some of the theme packagesTheme: Semantic UIAffects the uniforms-semantic packageAffects the uniforms-semantic packageType: FeatureNew features and feature requestsNew features and feature requests
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
StatusShow more project fields
On Hold
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
readonlyclass to the outer div, similar to thedisabledclass, 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.