Skip to content

Commit cf8cd2f

Browse files
committed
Merge pull request #5145 from azurelogic/master
Fix intermittent bug where dropdowns are not properly removed after editing.
2 parents ac2c89e + 74462b2 commit cf8cd2f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/features/edit/js/gridEdit.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@
660660
* [ {id: xxx, value: xxx} ], which will be used to populate
661661
* the edit dropdown. This can be used when the dropdown values are dependent on
662662
* the backing row entity with some kind of algorithm.
663-
* If this property is set then both editDropdownOptionsArray and
663+
* If this property is set then both editDropdownOptionsArray and
664664
* editDropdownRowEntityOptionsArrayPath will be ignored.
665665
* @param {object} rowEntity the options.data element that the returned array refers to
666666
* @param {object} colDef the column that implements this dropdown
@@ -856,7 +856,10 @@
856856
var gridCellContentsEl = angular.element($elm.children()[0]);
857857
//remove edit element
858858
editCellScope.$destroy();
859-
angular.element($elm.children()[1]).remove();
859+
var children = $elm.children();
860+
for (var i = 1; i < children.length; i++) {
861+
angular.element(children[i]).remove();
862+
}
860863
gridCellContentsEl.removeClass('ui-grid-cell-contents-hidden');
861864
inEdit = false;
862865
registerBeginEditEvents();

0 commit comments

Comments
 (0)