Can it be made typeahead instead of dropdown?
Similar to the previous select2 multiple, can this multiple checkboxes be made typeahead too?
What I mean is the user types for the value, gets it, checks it, clicks outside, the label shows "1 selected". If instead of clicking outside, he backspaces and types another, gets it, checks it, clicks outside, the label shows "2 selected". Something like this.
So if you refer, https://jsfiddle.net/wasikuss/7ak9skbb/, I guess I am asking if the 2nd and 3rd select box functionalities can be combined?
+1
add minimumResultsForSearch: 0 then you can search for items.
https://select2.org/searching#limiting-display-of-the-search-box-to-large-result-sets - for meaning of this option.
https://jsfiddle.net/04mar3z9/ - here you can check how it works
well, using that selection does not work, at least for me :)
well, using that selection does not work, at least for me :)
If you place minimumResultsForSearch before templateSelection it works as expected.
$('.select2-multiple2').select2MultiCheckboxes({
minimumResultsForSearch: 0,
templateSelection: function(selected, total) {
return "Selected " + selected.length + " of " + total;
}
});