Is your feature request related to a problem? Please describe.
Unless I'm completely missing it, there doesn't seem to be an easy way to designate a disabled. Setting editable to false prevents the user from making edits, but the field is still focusable and not marked as disabled in the DOM for screen readers.
Describe a solution you'd like
I'm honestly not sure the best way to implement this, but I'd really like for there to be a way to ensure a TextInput is properly disabled. This is problematic because this distinction doesn't seem to exist in react-native proper, so I suppose it'd have to be a web-only prop of some kind?
Though, perhaps it's not too much of a stretch to assume that if the field isn't editable it's actually disabled?
Or a middle ground could be a web-only boolean prop that, when true, maps editable to mean disabled as well? That would help prevent introducing a breaking change to the API.
Describe alternatives you've considered
Another alternative would be to not make any API changes, but to document what ought to be passed as props to properly disable the input (aria attributes, etc.). This has the advantage of keeping the API more consistent with RN and doesn't require any code changes, but it relies on users of this library to take the initiative to add support in their own implementations.
I think this component's API in React Native may be missing a "disabled" prop. I'll add it here in the meantime鈥nless editable in React Native is equivalent to disabled rather than readOnly? /cc @hramos
Not sure about distinction between editable/disabled, cc @shergin who worked on the TextInput rewrite.
I do see a difference between editable=false and proposed enabled=false. I think we should have it. PR is welcomed; I am okay with landing this as soon we have a decent implementation for both platforms.
To clarify, are you open to adding a disabled prop that functions as you'd expect on web while retaining the current editable prop as an equivalent to web's readOnly?
I am not sure how exactly disabled prop works on web but, assuming that it makes the component unfocusable, yes.
Are there any plans to implement this still?
Most helpful comment
I am not sure how exactly
disabledprop works on web but, assuming that it makes the component unfocusable, yes.