-
-
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
[pickers] Update closeOnSelect
and actionBar.actions
default values
#15944
base: master
Are you sure you want to change the base?
Conversation
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
@@ -53,6 +53,7 @@ const DesktopDateRangePicker = React.forwardRef(function DesktopDateRangePicker< | |||
|
|||
const props = { | |||
...defaultizedProps, | |||
closeOnSelect: defaultizedProps.closeOnSelect ?? true, |
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.
Explicitly providing true
default in case of DesktopDateRangePicker
and DatePicker
.
docs/data/migration/migration-pickers-v7/migration-pickers-v7.md
Outdated
Show resolved
Hide resolved
docs/data/migration/migration-pickers-v7/migration-pickers-v7.md
Outdated
Show resolved
Hide resolved
Signed-off-by: Lukas Tyla <[email protected]>
Only `<DesktopDatePicker />` and `<DesktopDateRangePicker />` have `closeOnSelect` set to `true` by default. | ||
|
||
This change goes hand in hand with the new default `actions` prop value for the `<PickersActionBar />` component. | ||
The default value of the `actions` prop has been updated to `['cancel', 'accept']` for all Picker components with complex views, except for `<DesktopDatePicker />` and `<DesktopDateRangePicker />`. |
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.
I would remove the concept of "complex" value which is very subjectif and instead list the pickers.
This change goes hand in hand with the new default `actions` prop value for the `<PickersActionBar />` component. | ||
The default value of the `actions` prop has been updated to `['cancel', 'accept']` for all Picker components with complex views, except for `<DesktopDatePicker />` and `<DesktopDateRangePicker />`. | ||
|
||
If the updated values do not fit your use case, you can override them. |
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.
A link on the doc that shows how to override can be a nice addition
Created from #14397.
Closes #9310.