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

Keep selection order

Open royfrancis opened this issue 7 years ago • 3 comments

I find that bootstrap-select returns selected items (multiple selection) in alphabetical order regardless of the actual order of selection. Is it possible to keep the order of selection?

royfrancis avatar Oct 17 '18 06:10 royfrancis

Any solutions?

ram02z avatar Apr 13 '20 01:04 ram02z

This does work for me

const picker = $('#mySelect');

picker.on('loaded.bs.select', selectedFirst);
picker.on('change.bs.select', selectedFirst);

function selectedFirst () {
  $(this).find('option:selected').prependTo(this);
  $(this).selectpicker('refresh');
}

stebogit avatar Feb 09 '21 09:02 stebogit

@stebogit Hi! How is it possible to implement such solution? I'm attempting to change the behaviour of shinywidgets::pickerInput.

Igna43 avatar Jul 28 '21 18:07 Igna43