bootstrap-select icon indicating copy to clipboard operation
bootstrap-select copied to clipboard

[FEATURE REQUEST] Search events and methods.

Open ghost opened this issue 10 years ago • 9 comments

I really love this plugin, and I'm using it for every select box in my application, but now I'm working on something that involves filtering through 10,000+ items.

Adding ajax search support is probably outside the scope of this project, but the following items should be easy to implement and would allow one to extend that kind of functionality themselves.

Events

  • Text input on search box. - e.g. $('#item').on('search.input.bs.select', function(){})
  • Before search starts. - e.g. $('#item').on('search.initiated.bs.select', function(){})
  • After search finished (w/results). - e.g. $('#item').on('search.finished.bs.select', function(){})

Methods

  • Access to elements.
    • $('#item').selectpicker('search.input).val()
  • Manually initiate/update a search.
    • $('#item').selectpicker('search.update')

ghost avatar Feb 21 '16 02:02 ghost

This is what i want to see in this project! Awesome feature. Will be cool, if there is an option to add button after the "no results" message. This button could call custom event passed on input with mentioned option.

tomisykora avatar Feb 22 '16 15:02 tomisykora

Right now I was looking for this feature. It would be great if it is implemented in the future

pedrovegaonline avatar Jan 08 '17 06:01 pedrovegaonline

same :(

winex01 avatar Feb 23 '18 08:02 winex01

This feature would be great. Maybe with an optional button to "Load All Values" too, like this: image

ataft avatar Jun 27 '18 00:06 ataft

Use this simple code and enjoy :D $(document).on("change","#select-picker",function(){ $search_value="blob blob"; $("button[data-id='"+$(this).attr("id")+"']").next().children(".bs-searchbox").children("input[type='search']").val($search_value).trigger('propertychange'); }); // Bootstrap-select v1.13.9 Tested and working in v1.13.9

AmirrezaM-dev avatar Oct 19 '20 14:10 AmirrezaM-dev

Fixed here- https://github.com/snapappointments/bootstrap-select/commit/94c0edb3adcfaacd4293e15e05a3c1a060e84948

yaakovLowenstein avatar Nov 19 '21 18:11 yaakovLowenstein

thanks @yaakovLowenstein for helping with triage!

NicolasCARPi avatar Nov 27 '21 02:11 NicolasCARPi

@NicolasCARPi This hasn't been implemented yet.

caseyjhol avatar Nov 27 '21 04:11 caseyjhol

Related issue: https://github.com/snapappointments/bootstrap-select/issues/2000 Might be considered to be tackled as part of this issue (if hasn't been already).

scr4bble avatar Nov 24 '23 00:11 scr4bble