Skip to content

Commit 4db929c

Browse files
Copilotsharder996
andcommitted
[gui] Fix table header overflow in empty state
Add horizontal scrolling to empty state header row by wrapping it in SingleChildScrollView with horizontal scroll direction, matching the behavior of the non-empty table state. Co-authored-by: sharder996 <59572507+sharder996@users.noreply.github.com> Co-authored-by: sharder996 <59572507+sharder996@users.noreply.github.com>
1 parent 9ddce05 commit 4db929c

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/client/gui/lib/vm_table/table.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ class _TableState<T> extends State<Table<T>> {
5757
int? sortIndex;
5858

5959
static const borderSide = BorderSide(color: Colors.grey, width: 0.5);
60-
static const rowHeight = 50.0;
6160

6261
@override
6362
void dispose() {
@@ -180,7 +179,7 @@ class _TableState<T> extends State<Table<T>> {
180179
children: [
181180
// Properly styled header row that matches the regular table
182181
SizedBox(
183-
height: rowHeight,
182+
height: 50, // Match table row height
184183
child: Scrollbar(
185184
controller: horizontal,
186185
child: SingleChildScrollView(
@@ -191,7 +190,7 @@ class _TableState<T> extends State<Table<T>> {
191190
for (int i = 0; i < widget.headers.length; i++)
192191
Container(
193192
width: widget.headers[i].width,
194-
height: rowHeight,
193+
height: 50,
195194
decoration: const BoxDecoration(
196195
border: Border(
197196
bottom: borderSide,
@@ -218,7 +217,7 @@ class _TableState<T> extends State<Table<T>> {
218217
pinnedRowCount: 1,
219218
rowCount: cells.length,
220219
columnCount: widget.headers.length + 1,
221-
rowBuilder: (_) => const TableSpan(extent: FixedTableSpanExtent(rowHeight)),
220+
rowBuilder: (_) => const TableSpan(extent: FixedTableSpanExtent(50)),
222221
columnBuilder: (i) => TableSpan(
223222
extent: i == widget.headers.length
224223
? const RemainingTableSpanExtent()

0 commit comments

Comments
 (0)