question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[React] `Combobox.Input` does not clear after removing the current value from the combobox.

See original GitHub issue

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

v1.5.0

What browser are you using?

Chrome

Reproduction URL

https://codesandbox.io/s/sad-wood-nl999t?file=/src/App.js

Describe your issue

After removing the current value from the combobox, the old value is still displayed in the Combobox.Input. Manually I am able to remove the input value, but doesn’t work if the current value of the combobox is removed.

https://user-images.githubusercontent.com/1703020/156242995-a046964d-4394-47fd-add5-e70d7f25fa15.mov

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

9reactions
jmdtccommented, Mar 15, 2022

Hi @RobinMalfait, I tried the insiders version @headlessui/react": "^0.0.0-insiders.63383c4 and it’s not working, even with the sandbox included in this example. Is there something I am missing?

3reactions
RobinMalfaitcommented, Mar 2, 2022

Hey! Thank you for your bug report! Much appreciated! 🙏

This should be fixed by #1181, and will be available in the next release.

You can already try it using:

  • npm install @headlessui/react@insiders or yarn add @headlessui/react@insiders.
  • npm install @headlessui/vue@insiders or yarn add @headlessui/vue@insiders.
Read more comments on GitHub >

github_iconTop Results From Across the Web

React widgets combobox; how to clear input or prevent selection
I tried getting the input node's value manually to '' with reactDOM, but the value didn't change. I would guess that the component...
Read more >
API - React Select
A flexible and beautiful Select Input control for ReactJS with multiselect, autocomplete and ajax support.
Read more >
Select - Ant Design
Select component to select value from options. When To Use. A dropdown menu for displaying choices - an elegant alternative to the native...
Read more >
multiselect-react-dropdown - npm
Prop Type Default options array onSelect function func onRemove function func
Read more >
Clear the value (selection) of a combobox, dropdown, input
With the MVVM patter used by the framework, you do not need methods like Clear() to remove selection - when the Value matches...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found