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
[x ] Search for if my issue has already been submitted
[x ] Make sure I'm reporting something precise that needs to be fixed
[x ] Give my issue a descriptive and concise title
Create a minimal working example on JsFiddle or Codepen
(or gave a link to a demo on the Selectize docs)
[x ] Indicate precise steps to reproduce in numbers and the result,
like below
I have a selectize dropdown that is loaded with Ajax at document ready. The options are well added, and can be selected by user.
But I have another function that loads the already selected option via another ajax when the modal (where the dropdown is) is shown, and after the options are loaded. But in doing so, all the options are removed from the dropdown.
I tried from the console this line:
jQuery('.targetSel.responsible').selectize()[0].selectize.addItem(912);
The idea was to select the corresponding option (that is the right value of one option of the dropwdown).
Steps to reproduce:
Add options with AJAX at jQuery(document).ready()
Open a modal that must have the dropdown
Call a function where the modal is opened that uses .addItem() method to select the already saved items
Expected result:
The items saved on database are selected based on value
Actual result:
The options are removed
The text was updated successfully, but these errors were encountered:
My apologies, I haven't been able to set up a demo yet to reproduce this.
If you are able to give us a codepen that would be great, otherwise it may take some time before I can take a look
I did:
(or gave a link to a demo on the Selectize docs)
like below
I have a selectize dropdown that is loaded with Ajax at document ready. The options are well added, and can be selected by user.
But I have another function that loads the already selected option via another ajax when the modal (where the dropdown is) is shown, and after the options are loaded. But in doing so, all the options are removed from the dropdown.
I tried from the console this line:
jQuery('.targetSel.responsible').selectize()[0].selectize.addItem(912);
The idea was to select the corresponding option (that is the right value of one option of the dropwdown).
Steps to reproduce:
Expected result:
The items saved on database are selected based on value
Actual result:
The options are removed
The text was updated successfully, but these errors were encountered: