Skip to content

Save only if something has changed #1746

Open
@whollaus

Description

@whollaus

Problem:

Is it possible to fire the event only if something has really changed? Currently my Ajax call is always called, even if you move the elements only a few millimeters. But without really changing anything.

Thanks!

store: {
  set: function (sortable) {
    let order = sortable.toArray();
    console.log(order);
    $.ajax({
      url: url,
      type: 'POST',
      data: {order: order},
      ...
    })
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementQuality of life changes to existing features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions