Skip to content

Canceling drop not working #60

@jetsmartone

Description

@jetsmartone

I need cancel dropping in 'drop' callback.
'return false' dont work because, List.invokeCallback('drop',...) always return 'true'.

invokeCallback: function invokeCallback(expression, event, index, item) {
      var fn = this[expression];
      if (fn) {
        fn({
          event: event,
          index: index,
          item: item || undefined,
          list: this.list,
          external: !this.vddlDragTypeWorkaround.isDragging,
          type: this.vddlDragTypeWorkaround.isDragging ? this.vddlDragTypeWorkaround.dragType : undefined
        });
      }
      --Attention--> return fn ? true : false;
    },

While must be

return fn({...

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