-
-
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] can't change option highlight color #23297
Closed
Closed
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d9d9308
[Autocomplete] Add focused, selected, disabled css classes in Autocom…
sujinleeme 44c4606
[Autocomplete] update proptypes
sujinleeme 81aaa6f
[Autocomplete] use useMemo to render grouped options
sujinleeme 645d58d
[Autocomplete] add optionFocused, optionSelected, optionDisabled classes
sujinleeme 3bd5c6c
[Autocomplete] add Pseudo-class focused, selected, disabled classes a…
sujinleeme 46e7e2e
[Autocomplete] fix prototypes test failing
sujinleeme 0e50916
[Autocomplete] change renderGoupedOptions
sujinleeme 3a9a103
[Autocomplete] use highlightedIndex instead of focusedIndex
sujinleeme a713a50
[Autocomplete] use useState for highlightedOptionIndex
sujinleeme File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It's too slow to rerender for this state. Try https://deploy-preview-23297--material-ui.netlify.app/components/autocomplete/#virtualization
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.
Can we improve performance for large options using
React.useMemo()
?https://github.com/mui-org/material-ui/blob/81aaa6f7ce18ad0b289ee8f0d73c0a20636e9cd9/packages/material-ui/src/Autocomplete/Autocomplete.js#L407-L423
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.
Maybe, virtualization is one case, we also need to consider when people use the render option API with "heavy" components, like the
MenuItem
.