Setting the Selected option when using onServerSearch and the option does not exist #239
Unanswered
thekingofspain
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Looking for the best approach on how to programically set the VirtualSelect selected option when using onServerSearch option population and the option that needs to be selected, exists on the server, but it is not one of options currently loaded in the virtual select.
Option 1: Create the option via setOptions() and then set it as selected via setValue().
Option 2: Call the onServerSearch callback with a searchValue that will return the option with the desire value to select, and then call setValue() after the virtualSelect operation completes.
Option 3: Some other way.
The use case is when a user changes the selected value of element A, the selected value of element B should be changed to reflect some metadata value associated with the selected option in element A.
Beta Was this translation helpful? Give feedback.
All reactions