Skip to content

Could support object array item move? #33

@bakso

Description

@bakso

Every item has an uuid, like

[{ id: 1 }, { id: 2 }, { id: 3 } ]

if move item idx.3 to idx.2 ,then looks like:

[{ id: 1 }, { id: 3 }, { id: 2 } ]

diff should produce

[ [ 1, { p: 0 } ], [ 2, { d: 0 } ] ]

and:

{ 
  a: [{ id: 1 }, { id: 2 }, { id: 3 }],
  b: [{ id: 4 }]
}

move a.idx2 to b, just like:

{
  a: [{ id: 1 }, { id: 3 }],
  b: [{ id: 2 }, { id: 4 }]
}

diff should produce

[ [ 'a', 1, { p: 0 } ], [ 'b', 0, { d: 0 } ] ]

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