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.
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 array is filled like so:
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