How to set selected value from select element #4349
-
I'm little confused about how to do this in I have a select that user can select list of
This is working great until one of item in the list get changed and I need to change my selectedItems in |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
what you need to do is dynamically compute the selected items instead of keeping everything in state. The state only shows what the user has selected, but you can derive something from that during render:
|
Beta Was this translation helpful? Give feedback.
what you need to do is dynamically compute the selected items instead of keeping everything in state. The state only shows what the user has selected, but you can derive something from that during render: