Expand and Unexpand top nodes in Treetable (#4313)
diff --git a/packages/devtools_app/lib/src/shared/table.dart b/packages/devtools_app/lib/src/shared/table.dart index 1a9f195..7568b9c 100644 --- a/packages/devtools_app/lib/src/shared/table.dart +++ b/packages/devtools_app/lib/src/shared/table.dart
@@ -453,7 +453,7 @@ if (widget == oldWidget) return; - if (widget.sortColumn != oldWidget.sortColumn || + if (widget.sortColumn.title != oldWidget.sortColumn.title || widget.sortDirection != oldWidget.sortDirection || !collectionEquals(widget.dataRoots, oldWidget.dataRoots)) { _initData(); @@ -466,7 +466,7 @@ void _initData() { dataRoots = List.generate(widget.dataRoots.length, (index) { final root = widget.dataRoots[index]; - if (widget.autoExpandRoots) { + if (widget.autoExpandRoots && !root.isExpanded) { root.expand(); } return root;