diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js index 06ccc97d9..3df2f9a51 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js @@ -183,7 +183,7 @@ if (this.options.resizeItem) { var that = this; this.element.children().each(function(i) { - that.options.resizeItem($(this).find(".red-ui-editableList-item-content"),i); + that.options.resizeItem($(this).children(".red-ui-editableList-item-content"),i); }); } }, @@ -223,7 +223,7 @@ var items = this.element.children(); var that = this; items.sort(function(A,B) { - return that.activeSort($(A).find(".red-ui-editableList-item-content").data('data'),$(B).find(".red-ui-editableList-item-content").data('data')); + return that.activeSort($(A).children(".red-ui-editableList-item-content").data('data'),$(B).children(".red-ui-editableList-item-content").data('data')); }); $.each(items,function(idx,li) { that.element.append(li); @@ -305,7 +305,7 @@ } if (this.options.addItem) { var index = that.element.children().length-1; - setTimeout(function() { + // setTimeout(function() { that.options.addItem(row,index,data); if (that.activeFilter) { try { @@ -321,7 +321,7 @@ that.uiContainer.scrollTop(that.element.height()); },0); } - },0); + // },0); } }, addItem: function(data) { @@ -334,7 +334,7 @@ }, removeItem: function(data) { var items = this.element.children().filter(function(f) { - return data === $(this).find(".red-ui-editableList-item-content").data('data'); + return data === $(this).children(".red-ui-editableList-item-content").data('data'); }); items.remove(); if (this.options.removeItem) { @@ -342,7 +342,7 @@ } }, items: function() { - return this.element.children().map(function(i) { return $(this).find(".red-ui-editableList-item-content"); }); + return this.element.children().map(function(i) { return $(this).children(".red-ui-editableList-item-content"); }); }, empty: function() { this.element.empty(); @@ -365,14 +365,14 @@ }, show: function(item) { var items = this.element.children().filter(function(f) { - return item === $(this).find(".red-ui-editableList-item-content").data('data'); + return item === $(this).children(".red-ui-editableList-item-content").data('data'); }); if (items.length > 0) { this.uiContainer.scrollTop(this.uiContainer.scrollTop()+items.position().top) } }, getItem: function(li) { - var el = li.find(".red-ui-editableList-item-content"); + var el = li.children(".red-ui-editableList-item-content"); if (el.length) { return el.data('data'); } else {