arendjr/selectivity

Redisplay form after submission. Selected options can't be removed.

Open

#186 aperta il 5 apr 2017

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)JavaScript (116 fork)batch import
help wanted

Metriche repository

Star
 (1103 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

I am trying to use Selectivity.js for a multi-select on a form with several other inputs. Upon submission, when the form is redisplayed (because of validation errors in other fields), I display the previously selected options back by using "selected" in those options.

Now, if I try to remove any of the options I had selected in the previous step and resubmit the form, the removed options continue to be selected. And that is understandable, because clicking the remove icon does not remove it from the element. How can I make the removed items also removed from the element. Or is there another way to accomplish this.

Thanks!

Guida contributor