ComboBox doesn't update immediately after set value via useState
See original GitHub issueDescribe the bug The value of ComboBox doesn’t update immediately after set value via useState.
To reproduce Steps to reproduce the behavior:
- Go to https://sap.github.io/ui5-webcomponents-react/?path=/story/ui5-web-components-combobox--generated-default-story
- Click the down arrow to select one item from the dropdown list.
- Typing some text like ‘test’ in the
value
property on the right panel, you will see the ComboBox still shows the previous value text. - Just click on the ComboBox, you will see the text updated.
Expected behavior The text value should be updated immediately once changing it.
Context
- UI5 Web Components version: v0.10.5
Affected components (if known) ComboBox
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Component not updating even though useState value has ...
1. I don't follow, if userName has updated in the useEffect when you log it, it's the same value used in the render...
Read more >React setState does not immediately update the state - Medium
Returns a stateful value, and a function to update it. The function to update the state can be called with a new value...
Read more >How To Bind State with Select Option (Combo Box) on REACT ...
How To Bind State with Select Option ( Combo Box ) on REACT.Hey guys!! if you learn something new or my video helps...
Read more >How To Call Web APIs with the useEffect Hook in React
After creating the state handlers, set the value of the input to itemInput and update the value by passing the event.target.value to the ......
Read more >[Resolved] useState not showing updated value - Freaky Jolly
Sometimes when updating the state in a functional or class component in React, does not reflect the updated values immediately.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @fifoosid,
looks like ComboBox is not reacting to the value update immediately. I’ve created this codesandbox with “plain” UI5 Web Components and I can observe the same behavior.
Web Components Version: 1.0.0-rc.8
I am taking over that one. We included it in the current backlog and I will update you for any progress made in a few days.