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

[Select][base] Rename the optionStringifier prop #37118

Merged
merged 2 commits into from May 2, 2023

Conversation

michaldudak
Copy link
Member

Breaking change

Renamed the optionStringifier prop of Base UI Select and useSelect to getOptionAsString.

-<Select optionStringifier={(option) => option.value} />
+<Select getOptionAsString={(option) => option.value} />
 useSelect({
   // ...
-  optionStringifier: (option) => option.value,
+  getOptionAsString: (option) => option.value,
 });

Also renamed several internal identifiers.

Closes #36283

@michaldudak michaldudak added component: select This is the name of the generic UI component, not the React module! package: base-ui Specific to @mui/base enhancement This is not a bug, nor a new feature labels May 1, 2023
@michaldudak michaldudak requested a review from a team May 1, 2023 12:05
@mui-bot
Copy link

mui-bot commented May 1, 2023

Netlify deploy preview

https://deploy-preview-37118--material-ui.netlify.app/

Bundle size report

Details of bundle changes

Generated by 🚫 dangerJS against df38c64

Copy link
Member

@mj12albert mj12albert left a comment

Choose a reason for hiding this comment

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

Looks good 🙆‍♂️

@michaldudak michaldudak merged commit 7156d88 into mui:master May 2, 2023
25 checks passed
@michaldudak michaldudak deleted the select-api-consistency branch May 2, 2023 20:42
binh1298 pushed a commit to binh1298/material-ui that referenced this pull request May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change component: select This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature package: base-ui Specific to @mui/base
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Select][base] Consistency in props naming
3 participants