jquery-sortable icon indicating copy to clipboard operation
jquery-sortable copied to clipboard

.sortable('toArray', {attribute: 'data-id')) returns a list of jQuery objects

Open bturner1273 opened this issue 5 years ago • 0 comments

Fiddle: https://jsfiddle.net/bturner1273/frgnw4cj

In my code I end up have to do: console.log(group.sortable('serialize').get(0).filter(i => i['id'] !== undefined).map(i => i.id));

instead of: console.log(group.sortable('toArray', {attribute: 'data-id'}));

output of group.sortable('toArray', {attribute: 'data-id'}): image

expected result is an array of strings or numbers i.e. [0,1,2,3,4] or ['0', '1', '2', '3', '4']

bturner1273 avatar Sep 23 '20 18:09 bturner1273