harvesthq / chosen

Deprecated - Chosen is a library for making long, unwieldy select boxes more friendly.
http://harvesthq.github.io/chosen/
Other
21.85k stars 4.1k forks source link

dynamically remove or empty the 2nd select element selected options #3138

Closed chrysanly closed 1 year ago

chrysanly commented 1 year ago

Is there a possibility of doing this?

I have 2 select elements and the 2nd element get the options data when 1st element AJAX is triggered.

replicate: 1st select element: select multiple items Example: [sel1, sel2, sel3]

now on 2nd select element: the items the belong to sel1,sel2,sel3 is shown.

issue: when removing 1 item on 1st select example remove sel1. the 2nd select element should be empty

I've tried other solutions and reach help from others but now, I don't think that supports what I have in mind.