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

Correct select all behavior when using template fixes #246 #247

Merged
merged 2 commits into from
Feb 7, 2018
Merged

Correct select all behavior when using template fixes #246 #247

merged 2 commits into from
Feb 7, 2018

Conversation

digitv
Copy link
Contributor

@digitv digitv commented Feb 6, 2018

There is a bug with latest version of plugin. If you are using "templateResult" callback for list html code generation (select>option inner html differs from html inside ul>li element) "Select/deselect all" options is not functional.

Scope

This pull request includes a

  • Bug fix

Related Issues

#246

FIX "select/deselect all" when options generated by "templateResult" callback. Caused by different content of "option" tags and "li" elements.
@kartik-v
Copy link
Owner

kartik-v commented Feb 6, 2018

Thanks

  • have you tested it works for both with and without templateResult.
  • in that case, can you also add the minified JS ... You can use this tool to minify online

@digitv
Copy link
Contributor Author

digitv commented Feb 6, 2018

Yes, as you can see that does not rely on $.html() of options an list elements, but just checks attached option element from data-* attribute.
But I'm not sure how it works with AJAX loaded elements, because I'm not using that feature in current project. But if plugin has proper data-* binding on content loaded via AJAX it must work correctly.

@kartik-v kartik-v changed the title FIX select/deselect all Correct select all behavior when using template fixes #246 Feb 7, 2018
@kartik-v kartik-v merged commit 28f5fa4 into kartik-v:master Feb 7, 2018
@kartik-v
Copy link
Owner

I see this does not work for normal conditions (refer #252) - and need to revert it.

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.

2 participants