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] Extract the props of each field slot into a standalone hook for easier re-use #17114

Merged
merged 5 commits into from
Mar 26, 2025

Conversation

flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented Mar 24, 2025

Based on #14679
No behavior change

@flaviendelangle flaviendelangle added component: pickers This is the name of the generic UI component, not the React module! maintenance labels Mar 24, 2025
@flaviendelangle flaviendelangle self-assigned this Mar 24, 2025
Copy link

Thanks for adding a type label to the PR! 👍

event.preventDefault();
return;
}
const handleRootKeyDown = useEventCallback((event: React.KeyboardEvent<HTMLDivElement>) => {
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm keeping the props.onKeyDown?.(event) (and equivalents) here because on Base UI it's handled automatically so I can't have it in the shared code.

@mui-bot
Copy link

mui-bot commented Mar 24, 2025

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

Generated by 🚫 dangerJS against 826a5a7

@flaviendelangle flaviendelangle marked this pull request as draft March 24, 2025 15:21
…mplementation can re-use
@flaviendelangle flaviendelangle changed the title [fields] Extract root props into a standalone hook that the Base UI implementation can re-use [fields] Extract the props of each field slot into a standalone hook that the Base UI implementation can re-use Mar 25, 2025

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
@flaviendelangle flaviendelangle marked this pull request as ready for review March 25, 2025 14:02
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.

LGTM

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
@flaviendelangle flaviendelangle merged commit 1195366 into mui:master Mar 26, 2025
21 checks passed
@flaviendelangle flaviendelangle deleted the extract-root-props branch March 26, 2025 16:37
@LukasTy LukasTy changed the title [fields] Extract the props of each field slot into a standalone hook that the Base UI implementation can re-use [fields] Extract the props of each field slot into a standalone hook for easier re-use Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module! maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants