Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1607)

Unified Diff: Source/devtools/front_end/ui/DataGrid.js

Issue 398263003: DevTools: DataGrid: properly refresh detached nodes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ui/DataGrid.js
diff --git a/Source/devtools/front_end/ui/DataGrid.js b/Source/devtools/front_end/ui/DataGrid.js
index e869874e4f64ce29c59b1a123dec3c9ed8b82ceb..973eefdcb40c5a8df004e6bef1ef4f278fc75fd4 100644
--- a/Source/devtools/front_end/ui/DataGrid.js
+++ b/Source/devtools/front_end/ui/DataGrid.js
@@ -1278,18 +1278,22 @@ WebInspector.DataGridNode.prototype = {
this._element.classList.add("revealed");
this.createCells();
- this._element.createChild("td", "corner");
return this._element;
},
+ /**
+ * @protected
+ */
createCells: function()
{
+ this._element.removeChildren();
var columnsArray = this.dataGrid._visibleColumnsArray;
for (var i = 0; i < columnsArray.length; ++i) {
var cell = this.createCell(columnsArray[i].identifier);
this._element.appendChild(cell);
}
+ this._element.createChild("td", "corner");
},
get data()
@@ -1418,12 +1422,11 @@ WebInspector.DataGridNode.prototype = {
refresh: function()
{
- if (!this._element || !this.dataGrid)
+ if (!this.dataGrid)
+ delete this._element;
+ if (!this._element)
return;
-
- this._element.removeChildren();
this.createCells();
- this._element.createChild("td", "corner");
},
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698