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

Later calls to sortable() mustn't overwrite options set in earlier calls #470

Merged
merged 2 commits into from
Nov 8, 2018

Conversation

schuetzm
Copy link
Contributor

@schuetzm schuetzm commented Nov 2, 2018

When calling sortable() to enable sorting for newly added DOM elements, the options that were set by the first call are reverted to their defaults. This contradicts the documentation.

This PR fixes the problem. I've also added a test case.

Note that I'm not sure about the relationship between store(...).config and _data(..., 'opts'). AFAICS, the latter is only read from, so I assume the change in line 258 is safe.

@coveralls
Copy link

coveralls commented Nov 2, 2018

Coverage Status

Coverage decreased (-0.04%) to 79.193% when pulling 7338a9e on schuetzm:fix-reload into 2cf4042 on lukasoppermann:master.

@lukasoppermann
Copy link
Owner

Hey @schuetzm this looks pretty good. I will need to check it and merge it soon. Thank you. 👍 Would be awesome if you have more PRs to help.

@lukasoppermann lukasoppermann merged commit 451fe62 into lukasoppermann:master Nov 8, 2018
lukasoppermann added a commit that referenced this pull request Nov 8, 2018
@lukasoppermann
Copy link
Owner

Merged 👍

@schuetzm schuetzm deleted the fix-reload branch November 8, 2018 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants