Skip to content

Commit 643645f

Browse files
author
Ian Grant
committed
add css rule to keep header visible when maxHeight is set
1 parent 2b4abbc commit 643645f

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

packages/@adobe/spectrum-css-temp/components/table/index.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ svg.spectrum-Table-sortedIcon {
4444
border-left-style: solid;
4545
border-right-width: 1px;
4646
border-right-style: solid;
47+
flex: 0 0 auto;
4748
}
4849
.spectrum-Table-headCellContents {
4950
display: inline-block;

packages/@react-spectrum/table/chromatic/TableView.chromatic.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@ export const NestedColumns = Template().bind({});
198198
NestedColumns.storyName = 'nested columns';
199199
NestedColumns.args = {columns: nestedColumns, items};
200200

201+
export const MaxHeight = Template.bind({});
202+
MaxHeight.storyName = 'maxHeight defined';
203+
MaxHeight.args = {columns, items, maxHeight: 'size-100'};
204+
201205
export const Empty = EmptyTemplate().bind({});
202206
Empty.storyName = 'empty table';
203207
Empty.args = {};

packages/@react-spectrum/table/test/Table.test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,10 @@ describe('TableView', function () {
120120
});
121121

122122
beforeEach(() => {
123-
jest.spyOn(window, 'requestAnimationFrame').mockImplementation(cb => cb());
123+
jest.spyOn(window, 'requestAnimationFrame').mockImplementation(cb => {
124+
cb(0);
125+
return 0;
126+
});
124127
});
125128

126129
afterEach(() => {

0 commit comments

Comments
 (0)