Open protron opened 11 years ago
I fixed myself by doing these changes:
items: [],
)this.items = [];
in a new line inside the init
function. I've placed it just after the $.extend(...);
in line 95.This way, the variable "items" will to be stored in each instance of the dual list (instead of being inside the prototype, which is shared between instances).
After those changes, the button will exchange only the items on the corresponding dual list. And the rest of the functionality seems to be working without any problems.
Maybe (if I see no response on these) I'll create a fork of this nice project and apply this fix and the other one I posted about the _options variable.
If you have more than a dual list in the same page you will see that it doesn't matter which exchange-items button you press: all the dual lists will exchange its items every time you press any of them.
Sample here: http://jsfiddle.net/protron/fdYW5/