Skip to content
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

[RFR] Migrate DisabledInput to use useInput #3515

Merged
merged 2 commits into from
Aug 13, 2019
Merged

Conversation

djhi
Copy link
Contributor

@djhi djhi commented Aug 13, 2019

No description provided.

@djhi djhi added this to the 3.0.0 milestone Aug 13, 2019
@Kmaschta
Copy link
Contributor

Do we still need <DisabledInput />?
What's the difference with <TextInput source="id" disabled />?

@djhi
Copy link
Contributor Author

djhi commented Aug 13, 2019

What's the difference with ?

It's not disabled and we don't pass the event handlers (change, blur, focus)

@djhi
Copy link
Contributor Author

djhi commented Aug 13, 2019

PS: I agree with you though. I think having a readonly textinput is weird, especially without a readonly nor disabled attribute and it's probably not good regarding accessibility.

I suggest we deprecate it and add a readonly attribute. We should also print a message to explain how to migrate from it

@djhi
Copy link
Contributor Author

djhi commented Aug 13, 2019

However, this is not the purpose of this PR. I'm just migrating components from the injection pattern to hooks usage. Let's open an issue about the DisabledInput

@Kmaschta Kmaschta merged commit bd4ca73 into next Aug 13, 2019
@Kmaschta Kmaschta deleted the disabled-input-use-input branch August 13, 2019 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants