0

I am trying to load multiselect dropdown value based on click button action dynamically. When one click is performed value is selected and appended in the dropdown. But when I clicked next time, the dynamic values are appended to the previous value. So I decided to clear multiselect dropdown on each click.

But when values are selected dynamically, To clear dropdown

$('.ui.fluid.dropdown').dropdown('restore defaults');

$('.ui.fluid.dropdown').dropdown('clear');

Both also not working. Because of dynamic appending of data.

So my question is how to clear semantic mutiselect dropdown dynamically.

1 Answer 1

1

I tried to use the following code to clear the dropdown and it works fine.

var class_name = $('.ui.fluid.dropdown');

$(class_name).dropdown('clear');
$(class_name).dropdown('destroy');
$(class_name).dropdown('restore defaults');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.