Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select all option #365

Closed
johnflan opened this issue Aug 15, 2014 · 5 comments
Closed

Select all option #365

johnflan opened this issue Aug 15, 2014 · 5 comments

Comments

@johnflan
Copy link

It would be very useful to offer 'select-all' as an initialisation option.

@davidstutz
Copy link
Owner

What do you mean by initialization option?

@johnflan
Copy link
Author

Hi David,
I was thinking about something like providing a constructor option to select every element when the control is created.
I see that there is an example on the demo site for selecting/deselecting all options but its done by explicitly iterating through all items. It would be nice if this was performed as a function on the control itself.

@DanCampbellWY
Copy link

I was looking for this as well. Perhaps the simplest thing would be a particular 'value' in the select method that would select the "all" item:
.multiselect('select', 'Select-All', triggerOnChange)

Great tool! Thanks for your efforts!

@davidstutz
Copy link
Owner

OK, I will have a look. This should not be too difficult as the plugin already uses a selectAll option.

@johnflan your problem should simply be solved by setting all options of the select to selected, the plugin will mirror the initial state. However, I will think about integrating an option where all elements can be checked from the beginning.

davidstutz added a commit that referenced this issue Oct 13, 2014
#365. Additional option for selectAll.
@davidstutz
Copy link
Owner

The selectAll and deselectAll methods are documented and should solve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants