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] Improve validation internals #15419

Merged

Conversation

flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented Nov 14, 2024

Extracted from #15339

Nothing cricital here, it's just some cleaning in the internals.

  • Add a new interface for each validator (e.g: ValidateDatePropsToDefault) to list the keys that have a default value
  • Use those new interfaces to avoid duplicating logic like keyof BaseDateValidationProps | keyof BaseTimeValidationProps

@flaviendelangle flaviendelangle self-assigned this Nov 14, 2024
@flaviendelangle flaviendelangle added the component: pickers This is the name of the generic UI component, not the React module! label Nov 14, 2024
@flaviendelangle flaviendelangle force-pushed the validation-props-to-default branch from 37f30ce to 04e7950 Compare November 14, 2024 12:44
@flaviendelangle flaviendelangle force-pushed the validation-props-to-default branch from 04e7950 to d79dc96 Compare November 14, 2024 12:45
@mui-bot
Copy link

mui-bot commented Nov 14, 2024

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

Generated by 🚫 dangerJS against b9617b6

@flaviendelangle flaviendelangle marked this pull request as ready for review November 14, 2024 12:57
Copy link
Contributor

@noraleonte noraleonte left a comment

Choose a reason for hiding this comment

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

Thanks for this cleanup, LGTM! 👌

@flaviendelangle flaviendelangle merged commit 5371ebb into mui:master Nov 26, 2024
18 checks passed
@flaviendelangle flaviendelangle deleted the validation-props-to-default branch November 26, 2024 07:37
LukasTy pushed a commit to LukasTy/mui-x that referenced this pull request Dec 19, 2024
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!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants