When i set value default. Component re-render but value default not change. How to change it? Thanks #75
Unanswered
megabeehothanhminh
asked this question in
Q&A
Replies: 2 comments 1 reply
-
You can't do this. This is the correct behavior. Look at the examples from two popular select libraries (react-select and mantine). After click a button a component is re-render but visible default value is still the same. If you want then please share your code or describe the broader context of your problem then we can help you. |
Beta Was this translation helpful? Give feedback.
1 reply
-
In my project a generic select was created and when I set the defaultOption I went through the same problem, and to get around this I did the following using react-hook-form:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Beta Was this translation helpful? Give feedback.
All reactions