tree: prevent error when d&d-sorting with no change
This commit is contained in:
parent
46bdc4d68c
commit
7d59d5cbd5
1 changed files with 1 additions and 1 deletions
|
|
@ -58,7 +58,7 @@ class UiTree extends UiWidget {
|
|||
this.sortables = []
|
||||
this.sortCallback = (event)=>{
|
||||
var widget = widgetManager.widgets[event.to.parentNode.getAttribute('data-widget')]
|
||||
if (!widget) return
|
||||
if (!widget || event.oldIndex === event.newIndex) return
|
||||
this.trigger('sorted', {
|
||||
widget: widget,
|
||||
oldIndex: event.oldIndex,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue