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

Bug: Combobox autocomplete does not call change events when controlled #1492

Closed
scurker opened this issue May 29, 2024 · 0 comments · Fixed by #1493
Closed

Bug: Combobox autocomplete does not call change events when controlled #1492

scurker opened this issue May 29, 2024 · 0 comments · Fixed by #1493
Assignees
Labels
bug Something isn't working
Milestone

Comments

@scurker
Copy link
Member

scurker commented May 29, 2024

Steps to reproduce

Have a controlled Combobox with autocomplete="automatic":

function() {
  const [value, setValue] = useState();
  return (
    <Combobox 
      label="Auto Completion (Automatic)" 
      autocomplete="automatic"
      value={value}
      onChange={args => console.log(args)}
      onSelectionChange={args => console.log(args)}
    >
      <ComboboxOption>None</ComboboxOption>
      <ComboboxOption>Manual</ComboboxOption>
      <ComboboxOption>Automatic</ComboboxOption>
    </Combobox>
  )
}

Expected Behavior

When the automatic behavior occurs (either with the user blurring or tabbing out of the field) the change events should correctly be invoked.

Actual Behavior

No change events are called. The combobox appears to have updated state internally, but this leaves it out of sync with any external state.

Version

6.x

What browsers are you experiencing the problem on?

No response

Relevant log output

No response

Anything else we should know?

Additional information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant