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
Hi,
I'm trying to empty and then fill again the multi-select via Ajax. I see the Ajax works for a common multi-select filed, but if it is already using multi.js, it stays the same. How can I refresh the content? I see the multi.js already has a refresh_select function, but I don't know how to call it. Tahnks in advance!
The text was updated successfully, but these errors were encountered:
And in ajax response I repopulated the original select list and all links "a" inside non-selected-wrapper
$.ajax({method: 'GET',url: `your-url-here`,success: function(response){// response could be a json with id: valueconstavailable$('.non-selected-wrapper:first');letcont=0;for(iteminresponse){leta=document.createElement('a');a.setAttribute('tabindex',0);a.setAttribute('class','item');a.setAttribute('role','button');a.setAttribute('data-value',item);a.setAttribute('multi-index',cont);a.text=response[item];available.append(a);}})//... rest of your code});
Hi,
I'm trying to empty and then fill again the multi-select via Ajax. I see the Ajax works for a common multi-select filed, but if it is already using multi.js, it stays the same. How can I refresh the content? I see the multi.js already has a refresh_select function, but I don't know how to call it. Tahnks in advance!
The text was updated successfully, but these errors were encountered: