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

How to have a deselect option? #174

Closed
martabelfm opened this issue Aug 18, 2019 · 2 comments
Closed

How to have a deselect option? #174

martabelfm opened this issue Aug 18, 2019 · 2 comments

Comments

@martabelfm
Copy link

When selection is done, and I would like to select empty option, as nothing selected, how could this be done?

@markhalliwell
Copy link
Contributor

$('select').selectpicker('val', '');

@ppazos
Copy link

ppazos commented Apr 4, 2021

@markhalliwell I'm actually selection an empty option manually and the previously selected value appears on the select. If I try to execute that code in the changed.bs.select I get the error "too much recursion", because the selectpicker('val', '') triggers also the event.

How can I select an empty option and make an empty string appear on the select?

BTW if I remove the ajax plugin and keep the bootstrap-select, selecting the empty option works OK.

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