-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[TextField] Remove excessive catching of hiddenLabel prop #22444
[TextField] Remove excessive catching of hiddenLabel prop #22444
Conversation
@croraf Smart |
853e977
to
fcaef64
Compare
@croraf Thanks for reporting it, I have moved it to the next branch |
@oliviertassinari I saw some other properties with the same behavior, so I was wondering if this "unnecessary" exposing is perhaps done with intention (for example to improve DX intellisense prop values suggestions)? |
Do you have an example? |
If you mean the example of unused prop (and not the example Intellisense usage). I'm checking now again. And none is really "completely unused". But there are some of them that are "effectively unused". Let me explain. In |
@croraf I think that we include them to retain the generation of the default prop in the API docs and to make it obvious what the default values are. I'm not sure it's worth refactoring. |
But the default values are defined on the underlying component and the API says "Any other props supplied will be provided to the root element (FormControl)". Following the other logic we can return the |
The prop is only forwarded to the
FormControl
component, so no need to catch it.This should also be done on the
next
branch. Haven't found a section in the docs which explains to which branches (that is master or next) the new commits should land. Perhaps non-critical and new features should land only onnext
.