When you add or remove some item to/from the right list, in reality it’s not adding/removal. Double List has 2 lists that contain same data. Filtering is what’s happening when you add/remove.
Well, I thought of a solution that besides filtering would sort values in the right list. The changes to the code are minimal, yet since there is a lot of private API involved (methods and properties the names of which start with _), I had to copy most of dbllist code…
The real changes are:
- in this._moved store some kind of constantly incrementing values instead of booleans (webix.uid() seems to be most helpful here), so it’s
- when data in the right list are refiltered, sort them by this constantly incrementing value (that’s in
_refresh, which is a private method…)
I marked the changes to the logic with
// HERE! comments.