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

[docs] Improve the Select docs #37279

Merged
merged 7 commits into from
Jul 12, 2023
Merged

Conversation

michaldudak
Copy link
Member

A few improvements of the Base UI's Select docs.

@michaldudak michaldudak added docs Improvements or additions to the documentation component: select This is the name of the generic UI component, not the React module! package: base-ui Specific to @mui/base labels May 15, 2023
@mui-bot
Copy link

mui-bot commented May 15, 2023

Netlify deploy preview

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 3ef5a9b

docs/data/base/components/select/select.md Outdated Show resolved Hide resolved

### Controlled select

Select can be used as an uncontrolled or controlled component:
Copy link
Member

Choose a reason for hiding this comment

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

As we've learned with feedback in the X docs, we should add a callout here to briefly explain this concept. We could copy the text from this PR: mui/mui-x#8926

docs/data/base/components/select/select.md Outdated Show resolved Hide resolved
docs/data/base/components/select/select.md Outdated Show resolved Hide resolved
{{"demo": "UnstyledSelectControlled.js", "defaultCodeOpen": false}}

To set the value of the controlled Select, use the `value` prop.
In the other case the `defaultValue` can be used to set the initial value of the component.
Copy link
Member

Choose a reason for hiding this comment

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

What is meant by "In the other case" here? What is the other case—an uncontrolled Select?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. I rephrased it a bit.

michaldudak and others added 3 commits June 28, 2023 18:49
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com>
Signed-off-by: Michał Dudak <michal.dudak@gmail.com>
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Jul 7, 2023
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Jul 9, 2023
Copy link
Member

@samuelsycamore samuelsycamore left a comment

Choose a reason for hiding this comment

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

Good enough as is but here's one last round of polishing! 😁

docs/data/base/components/select/select.md Outdated Show resolved Hide resolved
docs/data/base/components/select/select.md Outdated Show resolved Hide resolved
docs/data/base/components/select/select.md Outdated Show resolved Hide resolved
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com>
Signed-off-by: Michał Dudak <michal.dudak@gmail.com>
@michaldudak michaldudak enabled auto-merge (squash) July 12, 2023 07:20
@michaldudak michaldudak merged commit f950ebf into mui:master Jul 12, 2023
17 checks passed
@michaldudak michaldudak deleted the select-docs branch July 12, 2023 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: select This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation package: base-ui Specific to @mui/base
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants