How to clear the Select2 value when closing the editor window

How to clear the Select2 value when closing the editor window

psenechalpsenechal Posts: 32Questions: 2Answers: 0

When using the Select2 plugin for Editor, which works really well by the way, after I successfully submit and the editor window closes, if I create another new record, the previous value that was selected in the Select2 dropdown still appears. Similarly, if the create editor window is opened and a value selected for the Select2 dropdown and the editor window closed without saving, when opening the editor window again for another create, the previously selected value is still there.

Is there a good way to clear out that value? I tried using the editor onClose even to select2('destroy') the element, but that didn't seem to have any effect.

Thanks.

Answers

  • allanallan Posts: 61,822Questions: 1Answers: 10,127 Site admin

    A rather embarrassing delay to my reply here - sorry! This thread details how to address the issue, and that chance will be in the next plug-in update (which should be later this week).

    Allan

This discussion has been closed.