-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[fields] Prevent keyboard editing when disabled #13900
[fields] Prevent keyboard editing when disabled #13900
Conversation
Deploy preview: https://deploy-preview-13900--material-ui-x.netlify.app/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! 👏
Thanks for taking care of it. 🙏
Could you add at least a few tests for v7 fields (with enableAccessibleFieldDOMStructure
) keyboard editing when disabled? 🙏
Source: #13387 (comment)
packages/x-date-pickers/src/internals/hooks/useField/useFieldV6TextField.ts
Show resolved
Hide resolved
packages/x-date-pickers/src/internals/hooks/useField/useFieldV6TextField.ts
Outdated
Show resolved
Hide resolved
a8c30aa
to
e27abf6
Compare
packages/x-date-pickers/src/DateField/tests/editing.DateField.test.tsx
Outdated
Show resolved
Hide resolved
@@ -744,6 +744,63 @@ describe('<DateField /> - Editing', () => { | |||
}); | |||
}); | |||
|
|||
describeAdapters('Disabled field', DateField, ({ renderWithProps }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you see a good reason to implement similar tests for TimeField
?
Or maybe test it elsewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I agree, there is no need to duplicate the tests on other regular Field components. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍
Great job! 💯 🚀
@@ -744,6 +744,63 @@ describe('<DateField /> - Editing', () => { | |||
}); | |||
}); | |||
|
|||
describeAdapters('Disabled field', DateField, ({ renderWithProps }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I agree, there is no need to duplicate the tests on other regular Field components. 👍
Co-authored-by: Arthur Balduini <[email protected]>
Co-authored-by: Arthur Balduini <[email protected]>
Closes #13387