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

Use JQuery.detach on removeItem so custom data attributes are retained #1251

Closed
wants to merge 1 commit into from

Conversation

john3parker
Copy link

I'm using a custom Item renderer with some custom data attribute fields. When .remove is used, JQuery removes the data-* and event handlers. Since selectize caches the rendered item it doesn't get created each time so the data-* attributes and even handlers are lost. To prevent his situation I changed the .remove() to .detach(). I also added a test to check for data-* attribute retention.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 9bb653b on john3parker:master into ** on selectize:master**.

@giero
Copy link

giero commented Aug 24, 2017

It's kind of connected with my issue: #1315

@github-actions
Copy link
Contributor

github-actions bot commented Jan 1, 2021

Stale pull request message

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.

None yet

3 participants