bentorfs / angular-bootstrap-multiselect

Native angularJS custom form element
http://bentorfs.github.io/angular-bootstrap-multiselect/
MIT License
79 stars 111 forks source link

search limit has a default of 25 even if no search limit attribute is set, and function on span tag is frustrating #78

Open mmestas opened 3 years ago

mmestas commented 3 years ago

b.searchLimit||25

The multiselect seems to default to a dropdown list of only the first 25 results unless the attribute, search-limit, is set - regardless of whether or not show-search was being used. I had not added the search option, yet my list was only displaying 25 items. When I added the attribute, search-limit="1000" or some other high number, only then did I see all my results.

It's odd that it defaults to 25 without having the search or any other options set anywhere. The default should preferably be ceiling.

Another issue is that the select function, toggleItem(), is set on the span tag, instead of the li. This means that if someone tries selecting the item sightly outside on the li where the padding is, the selection cannot be triggered. It would be nice if the library added the function to the li instead of the span tag.

ljluestc commented 10 months ago

b.searchLimit !== undefined ? b.searchLimit : <your_preferred_default_value> <li @click="toggleItem(item)">{{ item.text }}</li>