File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
packages/react-aria-components Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,11 @@ class TableCollection<T> extends BaseCollection<T> implements ITableCollection<T
37
37
}
38
38
39
39
commit ( firstKey : Key , lastKey : Key , isSSR = false ) {
40
- this . updateColumns ( ) ;
40
+ this . updateColumns ( isSSR ) ;
41
41
super . commit ( firstKey , lastKey , isSSR ) ;
42
42
}
43
43
44
- private updateColumns ( ) {
44
+ private updateColumns ( isSSR : boolean ) {
45
45
if ( ! this . columnsDirty ) {
46
46
return ;
47
47
}
@@ -75,7 +75,7 @@ class TableCollection<T> extends BaseCollection<T> implements ITableCollection<T
75
75
76
76
this . headerRows = buildHeaderRows ( columnKeyMap , this . columns ) ;
77
77
this . columnsDirty = false ;
78
- if ( this . rowHeaderColumnKeys . size === 0 && this . columns . length > 0 ) {
78
+ if ( this . rowHeaderColumnKeys . size === 0 && this . columns . length > 0 && ! isSSR ) {
79
79
throw new Error ( 'A table must have at least one Column with the isRowHeader prop set to true' ) ;
80
80
}
81
81
}
Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ describe('Table SSR', function () {
24
24
<button onClick={() => setShow(true)}>Show</button>
25
25
<Table aria-label="Table">
26
26
<TableHeader>
27
- <Column isRowHeader >Foo</Column>
28
- <Column>Bar</Column>
27
+ <Column>Foo</Column>
28
+ <Column isRowHeader >Bar</Column>
29
29
</TableHeader>
30
30
<TableBody>
31
31
<Row key="1">
You can’t perform that action at this time.
0 commit comments