Open daftspunk opened 7 months ago
1) Create two sortables on the same page: List A and List B
2) The options.handle must be specified for some reason
options.handle
3) Add an event when a checkbox is unchecked inside List A
4) Set event to destroy and replace SortableJS on List B
All checkboxes on List A are rechecked when List B is rebound (via _nulling)
_nulling
The checkbox should remain unchecked
It seems to happen because savedInputChecked is a global instance. So List B's store will contain List A's checkboxes...
savedInputChecked
The proposed code ensures the checkboxes remain within the scope of the relevant instance.
This may be a solution to #1052's continuation since people are still suggesting it's broken.
It could be why you can't reproduce it, since two SortableJS instances are needed to produce the collision/outcome.
Steps to Reproduce Issue
1) Create two sortables on the same page: List A and List B
2) The
options.handle
must be specified for some reason3) Add an event when a checkbox is unchecked inside List A
4) Set event to destroy and replace SortableJS on List B
Problem
All checkboxes on List A are rechecked when List B is rebound (via
_nulling
)Expectation
The checkbox should remain unchecked
Proposed Fix
It seems to happen because
savedInputChecked
is a global instance. So List B's store will contain List A's checkboxes...The proposed code ensures the checkboxes remain within the scope of the relevant instance.
Related
This may be a solution to #1052's continuation since people are still suggesting it's broken.
It could be why you can't reproduce it, since two SortableJS instances are needed to produce the collision/outcome.