fabianlindfors / multi.js

A user-friendly replacement for select boxes with the multiple attribute enabled
https://fabianlindfors.se/multijs
MIT License
953 stars 76 forks source link

Select all and deselect all buttons #17

Closed symonenkov closed 6 years ago

symonenkov commented 7 years ago

Hello, great library! I added option 'select_all' to create buttons that select all and deselect all.

fabianlindfors commented 7 years ago

Great work!

Everything seems fine and the code looks nice. I like that you chose to add a setting and that it defaults to not showing the buttons.

I only have a small remark. I think that the two buttons should be encased in a wrapper with a similar design to the search field. If you add that with a top border and some padding I will merge. :)

Thanks!

fabianlindfors commented 6 years ago

I'll close this PR for now. If you feel like fixing my remarks and bringing it up to date with the codebase, please re-open it!

Zeego commented 5 years ago

Nice idea. I would add that you need to set the type of the buttons to "button", otherwise they default to "submit", i.e. selectAll.setAttribute("type", "button"); deselectAll.setAttribute("type", "button");