File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -205,13 +205,6 @@ class Table<T> extends Object with SetStateMixin {
205
205
}
206
206
207
207
void _rebuildVirtualTable () {
208
- // When we modify the height of the spacer above the viewport, Chrome automatically
209
- // adjusts the scrollTop to compensate because it's trying to keep the same content
210
- // visible to the user. However, since we're overwriting the rows contents (shifting
211
- // the data in the rows) we want to retain the original scroll position so must stash
212
- // it and reset it later.
213
- final int originalScrollTop = element.scrollTop;
214
-
215
208
int firstRenderedRowInclusive = 0 ;
216
209
int lastRenderedRowExclusive = data? .length ?? 0 ;
217
210
@@ -273,10 +266,6 @@ class Table<T> extends Object with SetStateMixin {
273
266
(data.length - lastRenderedRowExclusive) * rowHeight;
274
267
_spacerAfterVisibleRows.height = '${spacerAfterHeight }px' ;
275
268
_tbody.element.children.add (_spacerAfterVisibleRows.element);
276
-
277
- // Restore the scroll position the user had scrolled to since Chrome may
278
- // have modified it after we changed the height of the "before" spacer.
279
- element.scrollTop = originalScrollTop;
280
269
}
281
270
282
271
void _rebuildStaticTable () => _buildTableRows (
Original file line number Diff line number Diff line change @@ -112,6 +112,10 @@ span.label.gc {
112
112
background-color : # 424242 ;
113
113
}
114
114
115
+ .table-virtual {
116
+ overflow-anchor : none;
117
+ }
118
+
115
119
.table-virtual td {
116
120
max-width : 500px ; /* required for text-overflow to work? */
117
121
overflow : hidden;
You can’t perform that action at this time.
0 commit comments