-
-
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] Set closeOnSelect
prop default value to false
on pickers containing time views
#14397
[pickers] Set closeOnSelect
prop default value to false
on pickers containing time views
#14397
Conversation
Deploy preview: https://deploy-preview-14397--material-ui-x.netlify.app/ Updated pages: |
9cfb636
to
d3f2f8c
Compare
d3f2f8c
to
7e6879b
Compare
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.
Thank you for taking care of it! 👍
I think that given this change of behavior, we should update the logic for default actions
to also include the extended logic for closeOnSelect
and have ['cancel', 'accept']
actions by default.
This would allow to remove the extra logic for this in:
const actionBarActions: PickersActionBarAction[] = shouldRenderTimeInASingleColumn | |
? [] | |
: ['accept']; |
mui-x/packages/x-date-pickers/src/DesktopDateTimePicker/DesktopDateTimePicker.tsx
Lines 176 to 178 in dd98382
const actionBarActions: PickersActionBarAction[] = shouldRenderTimeInASingleColumn | |
? [] | |
: ['accept']; |
Regarding the change itself—I think that we could deliver it on a minor release given a good changelog entry description and gotchas that people can expect when updating (i.e. the need to change tests), but I'd love to hear input from @flaviendelangle and @joserodolfofreitas.
Maybe you vote for keeping this change for v8 to avoid any potential backlash? 🤔
packages/x-date-pickers-pro/src/DateRangePicker/DateRangePicker.types.ts
Outdated
Show resolved
Hide resolved
packages/x-date-pickers-pro/src/DesktopDateRangePicker/DesktopDateRangePicker.tsx
Outdated
Show resolved
Hide resolved
packages/x-date-pickers-pro/src/DesktopDateRangePicker/DesktopDateRangePicker.types.ts
Outdated
Show resolved
Hide resolved
packages/x-date-pickers/src/DesktopTimePicker/tests/DesktopTimePicker.test.tsx
Outdated
Show resolved
Hide resolved
packages/x-date-pickers/src/DesktopTimePicker/tests/DesktopTimePicker.test.tsx
Outdated
Show resolved
Hide resolved
packages/x-date-pickers-pro/src/MobileDateRangePicker/MobileDateRangePicker.types.ts
Outdated
Show resolved
Hide resolved
packages/x-date-pickers/src/DesktopTimePicker/tests/DesktopTimePicker.test.tsx
Outdated
Show resolved
Hide resolved
83349bd
to
9bf7489
Compare
3280fb5
to
f820ac6
Compare
f820ac6
to
243ba59
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
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.
Another round of ideas. 😉
packages/x-date-pickers-pro/src/DateRangePicker/DateRangePicker.types.ts
Outdated
Show resolved
Hide resolved
packages/x-date-pickers-pro/src/DesktopDateRangePicker/DesktopDateRangePicker.types.ts
Outdated
Show resolved
Hide resolved
cf02861
to
26f9e34
Compare
packages/x-date-pickers-pro/src/DateRangePicker/DateRangePicker.types.ts
Outdated
Show resolved
Hide resolved
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Closes #9310
This PR introduces a breaking change because it changes the default value of the
closeOnSelect
prop, as mentioned here