Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

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

Open
kamilonteq opened this issue Apr 5, 2017 · 1 comment
Open

Comments

@kamilonteq
Copy link

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!

@arendjr
Copy link
Owner

arendjr commented Apr 19, 2017

Sorry, I'm not exactly sure what is happening here... Do you still see the items in the UI after you've tried to remove them? Or do they only remain in some internal data structure? Do you use the jQuery API or the React API?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants