Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbol X and form reset #7

Open
alexspirt opened this issue Aug 15, 2016 · 2 comments
Open

Symbol X and form reset #7

alexspirt opened this issue Aug 15, 2016 · 2 comments

Comments

@alexspirt
Copy link

alexspirt commented Aug 15, 2016

If form has a reset button, symbol X does not disappear when button is clicked

See example:
http://www.bootply.com/nIZihCQwUq

@gesquive
Copy link
Owner

gesquive commented Sep 2, 2016

Unfortunately there really isn't a good way of doing this. When the reset on a form is triggered, I have not seen any event that is triggered on the input itself, thus the 'x' is never removed.

The suggested fix would be to add an event to your reset button that runs something like $("input").addClear("option", "hide") to the inputs being reset.


That being said I have created a branch where the plugin also searches siblings of the input for a reset button and if found, binds to the click event of the reset button.

I don't like this approach because it is extremely reliant on the form being laid out in a simple way. A more complex layout would break the selector. If anyone can come up with a better way, I'm open to suggestions.

@qxygene
Copy link

qxygene commented Feb 11, 2018

$('.add-clear-x').hide();

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

No branches or pull requests

3 participants