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

[Autocomplete] Add docs interface for the hook #36242

Merged
merged 13 commits into from
Feb 27, 2023

Conversation

HeVictor
Copy link
Contributor

@HeVictor HeVictor commented Feb 18, 2023

Adds useAutocomplete return value interface

closes useAutocomplete in #35933

I was unable to generate any JS docs from running yarn docs:api so I probably missed exporting the new return value type somewhere, but I'm having some trouble figuring it out where that might be as the PR's for the other public hooks all had .ts versions for the hook but useAutocomplete only exists in .js so there must be a different mechanism. Pointers on this would be greatly appreciated

https://deploy-preview-36242--material-ui.netlify.app/base/api/use-autocomplete/#return-value

@oliviertassinari oliviertassinari changed the title Add interface for use autocomplete hook [Autocomplete] Add docs interface for the hook Feb 18, 2023
@oliviertassinari oliviertassinari added docs Improvements or additions to the documentation component: autocomplete This is the name of the generic UI component, not the React module! package: base-ui Specific to @mui/base labels Feb 18, 2023
@oliviertassinari
Copy link
Member

I was unable to generate any JS docs from running yarn docs:API

The type was wrongly spelled, it fixes the generation.

-AutoComplete
+Autocomplete

@HeVictor
Copy link
Contributor Author

Thanks for reviewing and fixing those up Olivier! Much appreciated

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Feb 21, 2023
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Feb 22, 2023
value: AutocompleteValue<T, Multiple, DisableClearable, FreeSolo>;
/**
* If `true`, the component has valid values selected.
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be:

Suggested change
* If `true`, the component has valid values selected.
* If `true`, the component input has some values.

Because in freeSolo mode, it can be any value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call-out, have amended my PR

@HeVictor HeVictor requested review from ZeeshanTamboli and removed request for mnajdova February 27, 2023 12:40
Copy link
Member

@ZeeshanTamboli ZeeshanTamboli left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks.

@mnajdova mnajdova merged commit 11b7536 into mui:master Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: autocomplete 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 typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants