You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My multiselect element is initialized with the array like so: $(multiSelectElement).multiselect('dataprovider', arrFillMultiSelectElement);
The multiselect is checked and some values are selected.
But then a new value is added later in the HTML and I need to read and add that value to the multiselect (already contains data and values).
Right now, I can just do by destroying what's present and recreating the multiselect from scratch, which means I lose all information that was already checked within the multiselect.
Thanks for any help
The text was updated successfully, but these errors were encountered:
mhguelleh
changed the title
Dynamically add option value to an existing multiselect element that has data
How to dynamically add option value to an existing multiselect element that has data
Sep 9, 2022
Hi, thanks for the wonderfull library.
But I am looking for a feature that I did not see in the docs.
Is there a way to add a newly created option to an existing multiselect element while preserving the data that's already present in the multiselect ?
For example, I have a multiselect that is initialized with an array of data on page load
My multiselect element is initialized with the array like so:
$(multiSelectElement).multiselect('dataprovider', arrFillMultiSelectElement);
The multiselect is checked and some values are selected.
But then a new value is added later in the HTML and I need to read and add that value to the multiselect (already contains data and values).
Right now, I can just do by destroying what's present and recreating the multiselect from scratch, which means I lose all information that was already checked within the multiselect.
Thanks for any help
The text was updated successfully, but these errors were encountered: