Skip to content

Commit d248a51

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

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-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: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import {TableWithBreadcrumbs} from '../stories/Table.stories';
3333
import {TextField} from '@react-spectrum/textfield';
3434
import {theme} from '@react-spectrum/theme-default';
3535
import {typeText} from '@react-spectrum/test-utils';
36+
import {useAsyncList} from '@react-stately/data';
3637
import userEvent from '@testing-library/user-event';
3738

3839
let columns = [
@@ -120,7 +121,10 @@ describe('TableView', function () {
120121
});
121122

122123
beforeEach(() => {
123-
jest.spyOn(window, 'requestAnimationFrame').mockImplementation(cb => cb());
124+
jest.spyOn(window, 'requestAnimationFrame').mockImplementation(cb => {
125+
cb(0);
126+
return 0;
127+
});
124128
});
125129

126130
afterEach(() => {

0 commit comments

Comments
 (0)