truckingsim / Ajax-Bootstrap-Select

This uses the bootstrap-select plugin and extends it so that you can use a remote source to search.
MIT License
280 stars 97 forks source link

reset/clear previous search result #184

Closed straycoders closed 4 years ago

straycoders commented 4 years ago

hi, I'm writing a record editor. Everytime I click e record for edit, a popup shown consisting an ajax-bootstrap-select. At the very first time, search result is empty. Then I do some search for data entry, save the record and close the popup. When I edit any other record, the same popup displayed again, but with ajax-bootstrap-select still keeping the previous search result, and I want it to be empty everytime I start editing a record. I've checked bootstrap-select documentation but found nothing helpful.

So far I have tried:

$("select#items").empty().selectpicker("refresh"); , but didn't work out..

extremely need solution asap. thank you in advance.

straycoders commented 4 years ago

hi, finally I found solution in #41, by jengjeng. this is exactly what I needed. thanks all!!