-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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 ListboxProps prop #18887
[Autocomplete] Add ListboxProps prop #18887
Conversation
Details of bundle changes.Comparing: 162515b...6e0bc67
|
@ChrisWiles It's a great first pull request on Material-UI 👌🏻. Thank you for working on it! |
@@ -818,7 +817,6 @@ export default function useAutocomplete(props) { | |||
// Prevent blur | |||
event.preventDefault(); | |||
}, | |||
...ListboxProps, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oliviertassinari if we are not passing ListboxProps via getListboxProps then we need to pass them down directly in Autocomplete.js
<ListboxComponent className={classes.listbox} {...getListboxProps()}>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you are right, thank you for double checking, we need to solve this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So do you want to add it to back getListboxProps or pass directly like below?
<ListboxComponent className={classes.listbox} {...getListboxProps()} {...ListboxProps }>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that the hook API shouldn't be involved in the logic. The code snippet you have shared looks great :).
Closes #18822