You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempting to update rows in grid that use 'tree' plugin encounters error if nodes are expanded, when updated. When child node is updated after parent node, tree.js (91) error encountered .
Example below calls store.put on parent object which works fine, but following store.put to child node fails with error in tree.js.
Issue seems to be in List.js. _When insertRow is called for second put/update, the rowIdToObject[id] value is not set, which cause failure elsewhere. For List.js code extract below, 'row' has a value, but 'beforeNode' has not.
if(!row || // we must create a row if it doesn't exist, or if it previously belonged to a different container
(beforeNode && row.parentNode != beforeNode.parentNode)){
if(row){// if it existed elsewhere in the DOM, we will remove it, so we can recreate it
this.removeRow(row);
}
row = this.renderRow(object, options);
row.className = (row.className || "") + " ui-state-default dgrid-row " + (i % 2 == 1 ? oddClass : evenClass);
// get the row id for easy retrieval
this._rowIdToObject[row.id = id] = object;
}
Without understanding cause of issue, the following code addition seems to prevent problem, Of course better understanding of code is needed, to determine if its a proper resolution.
else if (row && !this._rowIdToObject[id]) {
this._rowIdToObject[row.id] = row;
}
Attempting to update rows in grid that use 'tree' plugin encounters error if nodes are expanded, when updated. When child node is updated after parent node, tree.js (91) error encountered .
Example below calls store.put on parent object which works fine, but following store.put to child node fails with error in tree.js.
The text was updated successfully, but these errors were encountered: