Open dincoo opened 8 years ago
I have reset button on my form. In my reset function, i put this $('.select2').select2("val", ""); so that the my select2 input will be reset too. but there's an error.
The select2('val') method was called on an element that is not using Select2.
Please help?????
I am facing the same issue, any idea?
Make sure to any script call while on change event. If yes then make sure it properly work or not.
Update the js to look for class name before destroy.
elm.bind("$destroy", function () { if (elm.hasClass('.select2-offscreen')) { elm.select2("destroy"); } });
is my configure error? TypeError: Cannot read property 'val' of undefined