Skip to content

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

Description

@bturner1273

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']

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions