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

SelectAll and DeselectAll issues #721

Closed
brooklynb7 opened this issue Sep 1, 2014 · 8 comments
Closed

SelectAll and DeselectAll issues #721

brooklynb7 opened this issue Sep 1, 2014 · 8 comments
Labels

Comments

@brooklynb7
Copy link

I found that if I want to selectAll/deselectAll via program I must show the list items first otherwise these two events don't work.

And I digged into the code and I found that at line.860 and line.865, the selector for these two events is like this:

this.$lis.not('.divider').not('.disabled').filter('.selected').filter(':visible').find('a').click();

And the selector .filter(':visible') make this issue I guess. I commented this selector and then they work well.

So why is .filter(':visible') added here? Thanks

@t0xicCode
Copy link
Collaborator

It was added so that clicking "Select All" after having done a search in the option would only select the visible options. I'll look into an alternative implementation.

@caseyjhol
Copy link
Member

Perhaps .not('.hide') instead of .filter(':visible')

@t0xicCode
Copy link
Collaborator

Yeah, that would work.

@caseyjhol
Copy link
Member

Just tested and it looks like that fixes it. .filter(':visible') is a remnant from before we used the .hide class on hidden elements.

@t0xicCode
Copy link
Collaborator

Feel like committing the fix?

@t0xicCode t0xicCode added the bug label Sep 9, 2014
@caseyjhol
Copy link
Member

Swamped with another project right now, but should be able to get to this next week.

@marviljoy
Copy link

Please find a solution for this.. Very urgent

@ThCC
Copy link

ThCC commented Nov 24, 2014

+1

caseyjhol added a commit that referenced this issue Feb 18, 2015
SelectAll/DeselectAll (Fix #721, Fix #901, fix #921)
sindhushaballa pushed a commit to EmanateWireless/bootstrap-select that referenced this issue Apr 3, 2017
…#901)

Fixes performance issues with select/deselect all

Conflicts:
	dist/css/bootstrap-select.css
	dist/css/bootstrap-select.css.map
	dist/css/bootstrap-select.min.css
	dist/js/bootstrap-select.js
	dist/js/bootstrap-select.js.map
	dist/js/bootstrap-select.min.js
sindhushaballa pushed a commit to EmanateWireless/bootstrap-select that referenced this issue Apr 3, 2017
…intments#901)"

This reverts commit 3e8eb6c.

	modified:   dist/css/bootstrap-select.css
	modified:   dist/css/bootstrap-select.css.map
	modified:   dist/css/bootstrap-select.min.css
	modified:   dist/js/bootstrap-select.js
	modified:   dist/js/bootstrap-select.js.map
	modified:   dist/js/bootstrap-select.min.js
	modified:   js/bootstrap-select.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants