Open Sandeep13-web opened 5 months ago
Could you check the results are not empty?
I checked in api and the role ID is there but again i logged form to check the values and values were not setting in that specific key. Does it relate to the api result being number and i am changing it to string? But strange thing is when i refresh it's being populated.
In the form there are several inputs and all of them are being populated besides the select which someone populates and sometimes does not.
try this way,
value={field.value ? field.value.toString() : ""}
okay will try
same problem. spent my two days for this!
my current solution:
onValueChange={v => v != "" && field.onChange(v)}
Same problem.
This workaround fixed, but it wasn't what we expected:
onValueChange={v => v != "" && field.onChange(v)}
using key={field.value} worked for me.
Describe the bug
this is the code form select that i've been using. When i go into edit page, the i have populated the fields but the select does not populate.
i have used react query and the role id is not being set the first time. If i refresh the page then only the select is being populated. What seems to be the issue?
Affected component/components
Select
How to reproduce
.
Codesandbox/StackBlitz link
No response
Logs
No response
System Info
Before submitting