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

[pickers] Support name prop (#11025) #11380

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

flaviendelangle
Copy link
Member

Cherry pick from #11025

Co-authored-by: jasmyneokudo <38866525+jasmyneokudo@users.noreply.github.com>
@flaviendelangle flaviendelangle changed the base branch from next to master December 12, 2023 07:30
@flaviendelangle flaviendelangle self-assigned this Dec 12, 2023
@flaviendelangle flaviendelangle added component: pickers This is the name of the generic UI component, not the React module! cherry-pick The PR was cherry-picked from the next branch labels Dec 12, 2023
@flaviendelangle flaviendelangle changed the title Name prop master [pickers] Support name prop (#11025) Dec 12, 2023
@mui-bot
Copy link

mui-bot commented Dec 12, 2023

Deploy preview: https://deploy-preview-11380--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 268b27d

@flaviendelangle flaviendelangle marked this pull request as ready for review December 12, 2023 08:12
Copy link
Member

@michelengelen michelengelen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

juts nits ... LGTM

@@ -123,7 +124,7 @@ export const useDesktopRangePicker = <
timezone,
autoFocus: autoFocus && !props.open,
ref: fieldContainerRef,
...(fieldType === 'single-input' && { inputRef }),
...(fieldType === 'single-input' && { inputRef, name }),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: i am wondering why this isn't throwing an error. The problem with the short fused is that if the value is falsey it will get returned. This can happen here, so you are basically trying to spread a boolean value. 🤷🏼

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related to this PR
But if you think the behavior is not safe, we can improve it in a follow up 👍

@@ -3,7 +3,7 @@
"propDescriptions": {
"ampm": "12h/24h view for hour selection clock.",
"autoFocus": "If <code>true</code>, the <code>input</code> element is focused during the first mount.",
"color": "The color of the component. It supports both default and custom theme colors, which can be added as shown in the <a href=\"https://mui.com/material-ui/customization/palette/#adding-new-colors\">palette customization guide</a>.",
"color": "The color of the component. It supports both default and custom theme colors, which can be added as shown in the <a href=\"https://mui.com/material-ui/customization/palette/#custom-colors\">palette customization guide</a>.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this change seems unrelated. If it was intentional 🆗

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was intentional 👍

@flaviendelangle flaviendelangle merged commit ccb715f into mui:master Dec 13, 2023
17 checks passed
@flaviendelangle flaviendelangle deleted the name-prop-master branch December 13, 2023 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick The PR was cherry-picked from the next branch component: pickers This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants