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

Fix deselect and select option when using options with empty values #233

Closed
wants to merge 8 commits into from

Conversation

svrin
Copy link

@svrin svrin commented Feb 9, 2014

When using option elements with empty values (like for example, having a selectAllValue = '') the select and deselect option did not work properly. I removed both checks that prevented the empty string from becoming a list.

@philfreo
Copy link
Contributor

+1 to both of these changes

especially the ability to have clickable optgroups (sub select all options) via clickableGroups -- very handy

@@ -510,21 +521,25 @@
*/
createOptgroup: function(group) {
var groupName = $(group).prop('label');
var inputType = this.options.multiple ? "checkbox" : "radio";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need to add a line like this:

$('label', $li).addClass(inputType);

since all the other labels have a class of 'checkbox' or 'radio', the optgroup ones should also. the CSS/spacing can be messed up without it.

@philfreo
Copy link
Contributor

+1
@davidstutz thoughts on getting this merged?

@philfreo
Copy link
Contributor

@svrin @MartinMartimeo actually this PR (which used to work great) is now having issues on the latest master (+ #259 merged in) - I get an error when using using one of the sub 'select all' options. Perhaps you could rebase?

@svrin
Copy link
Author

svrin commented Mar 21, 2014

They are now seperated into 3 own branches and rebased/merged onto the current head. They should now work again with the current version.

@davidstutz
Copy link
Owner

Well, I will have a look. I skipped this the alst time as they were a lot of other (minor) fixes and issues I wanted to resolve first (more or less the same as this time, but I will try to understand the code and add it manually). Anyway, thanks for the work - great idea!

@davidstutz
Copy link
Owner

As #305 seems to be a similar implementation I prefer merging #305 - nothing personal, it is just that I cannot merge this pull request automatically ;) Thanks for your work anyway!

@davidstutz davidstutz closed this May 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants