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

[fields] Reset all selected state on section edit #16223

Merged
merged 3 commits into from
Jan 17, 2025

Conversation

LukasTy
Copy link
Member

@LukasTy LukasTy commented Jan 17, 2025

Fixes #16201.

The change resets the selectedSections to the activeSectionIndex when modification is done with navigation keys (Arrows, End, PageUp, etc.) just like with letters.
Wrong initial assumption, the selected section was only being reset on letter/digit editing when a jump to the next section was requested.
I've updated the approach to always reset the all selection state when doing a manual modification.

@LukasTy LukasTy added bug 🐛 Something doesn't work component: pickers This is the name of the generic UI component, not the React module! feature: Keyboard editing Related to the pickers keyboard edition needs cherry-pick The PR should be cherry-picked to master after merge v7.x labels Jan 17, 2025
@LukasTy LukasTy self-assigned this Jan 17, 2025
@LukasTy LukasTy changed the title Fix field editing with all selected [fields] Reset selected section on "navigation" edit Jan 17, 2025
@mui-bot
Copy link

mui-bot commented Jan 17, 2025

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

Generated by 🚫 dangerJS against 9555ec8

@LukasTy LukasTy marked this pull request as ready for review January 17, 2025 12:28
Copy link
Member

@flaviendelangle flaviendelangle left a comment

Choose a reason for hiding this comment

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

The behavior change makes a lot of sense 👌

@LukasTy LukasTy changed the title [fields] Reset selected section on "navigation" edit [fields] Reset all selected state on section edit Jan 17, 2025
@LukasTy LukasTy changed the title [fields] Reset all selected state on section edit [fields] Reset all selected state on section edit Jan 17, 2025
@LukasTy
Copy link
Member Author

LukasTy commented Jan 17, 2025

My initial assumption was incorrect.
I have updated the approach and the PR description to reflect the changes. 😉

@LukasTy LukasTy merged commit ad5da34 into mui:master Jan 17, 2025
18 checks passed
@LukasTy LukasTy deleted the fix-field-editing-with-all-selected branch January 17, 2025 20:34
Copy link

Cherry-pick PRs will be created targeting branches: v7.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: pickers This is the name of the generic UI component, not the React module! feature: Keyboard editing Related to the pickers keyboard edition needs cherry-pick The PR should be cherry-picked to master after merge v7.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[fields] arrow key navigation jumps from day to year part
3 participants