[docs] New recipe of a read-only field#14606
Merged
flaviendelangle merged 40 commits intomui:masterfrom Oct 7, 2024
Merged
Conversation
flaviendelangle
commented
Sep 13, 2024
flaviendelangle
commented
Sep 13, 2024
845e945 to
c7a1032
Compare
c7e9186 to
e668ed2
Compare
e668ed2 to
00c6329
Compare
26a8775 to
15fbfec
Compare
LukasTy
reviewed
Oct 4, 2024
1772912 to
0c81dda
Compare
0c81dda to
07a0285
Compare
flaviendelangle
commented
Oct 7, 2024
LukasTy
approved these changes
Oct 7, 2024
Member
LukasTy
left a comment
There was a problem hiding this comment.
Awesome work! 👏 💯
Leaving the final round of nitpicks. 🙈 😆
LukasTy
reviewed
Oct 7, 2024
…er.tsx Co-authored-by: Lukas Tyla <llukas.tyla@gmail.com> Signed-off-by: Flavien DELANGLE <flaviendelangle@gmail.com>
…er.tsx Co-authored-by: Lukas Tyla <llukas.tyla@gmail.com> Signed-off-by: Flavien DELANGLE <flaviendelangle@gmail.com>
…r.ts Co-authored-by: Lukas Tyla <llukas.tyla@gmail.com> Signed-off-by: Flavien DELANGLE <flaviendelangle@gmail.com>
Co-authored-by: Lukas Tyla <llukas.tyla@gmail.com> Signed-off-by: Flavien DELANGLE <flaviendelangle@gmail.com>
Co-authored-by: Lukas Tyla <llukas.tyla@gmail.com> Signed-off-by: Flavien DELANGLE <flaviendelangle@gmail.com>
68c41e9 to
018158d
Compare
LukasTy
reviewed
Oct 8, 2024
| InputProps={{ | ||
| ...InputProps, | ||
| readOnly: true, | ||
| endAdornment: <CalendarIcon color="action" />, |
Member
There was a problem hiding this comment.
I'm not sure we should have done this. 🙈
Now the keyboard navigation and a11y is borked. 🤷
Member
Author
There was a problem hiding this comment.
The Tab sequence looks good to me, it does not focus the adornment anymore
I don't have the aria label on the TextField though, should probably add that (could be a nice addition in the context)
This was referenced Nov 8, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #12342
Demo preview
It's a good opportunity to have a look at the overall DX of the most basic custom-behavior field possible.
In this PR
useFieldPlaceholderto generate the placeholder based on the formatPickersFieldContextand a public hookusePickersFieldContextto pass information from the picker to the field without impacting the props (only one prop for now to open the field, name under discussion)custom-behaviorfolder (I will move the button and the autocomplete demos there once refined)Follow up
useValidation,useFieldPlaceholder,usePickersFieldContextanduseSplitFieldPropsusePickersFieldContextinstead of drilling them down (would be breaking changes for v8).