vddl icon indicating copy to clipboard operation
vddl copied to clipboard

Canceling drop not working

Open jetsmartone opened this issue 5 years ago • 0 comments

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({...

jetsmartone avatar Jul 16 '19 08:07 jetsmartone