Closed wongCH closed 3 years ago
@wongCH It looks like you are trying to print options
instead of selected
it should be something like below
- <p>{JSON.stringify(options)}</p>
+ <p>{JSON.stringify(selected)}</p>
by making this change provided sandbox just works as expected
Hi @harshzalavadiya ,
When page first load, the Option only have Grape:
Picture above depicts the Option state that only contains "Grape" using version 4.0.3
To simplified my scenario,i wrote a function to overwrite the Option to the following:
"[{"label":"Mango 🥭","value":"mango"},{"label":"Strawberry 🍓","value":"strawberry"}]"
Unfortunately, the dropdown component do not reflect the new values after i tried to add into the Option state
Picture above depicts the Option state been replace with Mango and strawberry but the Dropdown component still show Grape using version 4.0.3
Below is the picture when i change the version to 4.0.1 that work.
@wongCH my bad, yes you are right, I looked at different thing, I'll try to see and fix this
@wongCH issue is fixed in latest release v4.0.4+
@harshzalavadiya thank you so much.
Describe the bug: When options state is updated, the dropdown do not show the new value.
To Reproduce:
This only happens from version 4.0.2 onwards. No issue with version 4.0.1
Sample Code using Version 4.0.3 https://codesandbox.io/s/react-kerl-bug-0hm06?file=/src/App.js
Desired behaviour: When Option state changes, component should reflect the state just like in version 4.0.1