Downshift: `useCombobox` controlled component not working as `Downshift`

Created on 30 Jan 2020  路  2Comments  路  Source: downshift-js/downshift

  • downshift version: 4.0.7
  • node version: 13
  • npm (or yarn) version: yarn 1.21.1

What you did:
I've tried using the new useCombobox hook instead of Downshift render prop in a controlled selecteItem scenario.

What happened:

The useCombobox version seems not to React to external changes of the selectedItem (e.g. clicking on the reset button)

Reproduction repository:

https://codesandbox.io/s/serverless-frog-uydo1?fontsize=14&hidenavigation=1&module=%2Fsrc%2Fmodules%2FRoot%2FRoot.js&theme=dark

Maybe I'm missing something of the new useCombobox API's, thanks in advance!

bug needs investigation

Most helpful comment

This may be a bug with how the inputValue is computed in the case of a controlled prop change. We should look into it.

All 2 comments

This may be a bug with how the inputValue is computed in the case of a controlled prop change. We should look into it.

Closing this in favour of attached issue, since it's the same one.

Was this page helpful?
0 / 5 - 0 ratings