react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

field components should consistently support isReadOnly and isRequired render-props+data-attributes

Open stefanprobst opened this issue 1 year ago • 1 comments

Provide a general summary of the feature here

this is continuing https://github.com/adobe/react-spectrum/issues/5930#issuecomment-1988997419

field components (i.e. those which can be used in a form) should consistently support disabled/invalid/readonly/required props, render-props, and data attributes.

i have tried to list the current support here (although not every case may make sense to support). also, i have not yet created a separate table for data-attributes, but it seems that these match render-props support:

props

RAC isDisabled isInvalid isReadOnly isRequired
CheckboxGroup
ComboBox
Date/TimeField
NumberField
RadioGroup
SearchField
Select
Slider
Switch
TextField

render props

RAC isDisabled isInvalid isReadOnly isRequired
CheckboxGroup
ComboBox
Date/TimeField
NumberField
RadioGroup
SearchField
Select
Slider
Switch
TextField

🤔 Expected Behavior?

see above

😯 Current Behavior

see above

💁 Possible Solution

No response

🔦 Context

see above

💻 Examples

No response

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

stefanprobst avatar Apr 04 '24 11:04 stefanprobst

Thanks for the issue and the details Related https://github.com/adobe/react-spectrum/issues/6192

snowystinger avatar Apr 18 '24 20:04 snowystinger