-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
scope: autocompleteChanges related to the autocomplete. This includes ComboBox.Changes related to the autocomplete. This includes ComboBox.type: bugIt doesn't behave as expected.It doesn't behave as expected.
Description
Current behavior 😯
Children of the list item are triggering onHighlightChange unexpectedly.
In the code below the span will trigger onHighlightChange
renderOption={(p, { label }) => {
return (
<div {...p}>
<span>{label}</span>
</div>
);
}}Expected behavior 🤔
The children of the list item should not trigger onHighlightChange event.
Steps to reproduce 🕹
Steps:
- open this codesandbox
- open console
- open Autocomplete
- mouse over an item label as shown in picture
- look at the console message count
Context 🔦
By applying pointerEvents: none to the child elements, this problem can be solved, however I don't believe this is a viable solution since use may need to use child events. and I believe it should be handled internally.
Your environment 🌎
Details
``` System: OS: Windows 10 Browsers: Chrome: Version 99.0.4844.51 ```Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
scope: autocompleteChanges related to the autocomplete. This includes ComboBox.Changes related to the autocomplete. This includes ComboBox.type: bugIt doesn't behave as expected.It doesn't behave as expected.
