Skip to content

Commit

Permalink
Merge branch 'master' into dashboard-editor
Browse files Browse the repository at this point in the history
  • Loading branch information
scottdickerson authored Oct 19, 2020
2 parents 11957b7 + 628ca76 commit c8e48c0
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/Table/TableHead/TableHead.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ const TableHead = ({
? matchingColumnMeta.align
: 'start';
const hasOverflow = Array.isArray(
matchingColumnMeta.overflowMenuItems
matchingColumnMeta?.overflowMenuItems
);

// Increases the minimum width of the Header when the overflow button is present
Expand Down
39 changes: 39 additions & 0 deletions src/components/TableCard/TableCard.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -586,4 +586,43 @@ describe('TableCard', () => {
expect(screen.queryAllByText(/^Medium$/g)).toHaveLength(1);
expect(screen.queryAllByText(/^Lowest$/g)).toHaveLength(5);
});
it('can be resized without crashing', () => {
const { rerender } = render(
<TableCard
id="table-list"
title="Testing resize"
content={{
columns: tableColumns,
}}
values={tableData}
size={CARD_SIZES.LARGE}
/>
);

rerender(
<TableCard
id="table-list"
title="Testing resize"
content={{
columns: tableColumns,
}}
values={tableData}
size={CARD_SIZES.LARGEWIDE}
/>
);

rerender(
<TableCard
id="table-list"
title="Testing resize"
content={{
columns: tableColumns,
}}
values={tableData}
size={CARD_SIZES.LARGE}
/>
);

expect(screen.getByText('Testing resize')).toBeInTheDocument();
});
});
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15391,9 +15391,9 @@ npm-run-path@^4.0.0:
path-key "^3.0.0"

npm-user-validate@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/npm-user-validate/-/npm-user-validate-1.0.0.tgz#8ceca0f5cea04d4e93519ef72d0557a75122e951"
integrity sha1-jOyg9c6gTU6TUZ73LQVXp1Ei6VE=
version "1.0.1"
resolved "https://registry.yarnpkg.com/npm-user-validate/-/npm-user-validate-1.0.1.tgz#31428fc5475fe8416023f178c0ab47935ad8c561"
integrity sha512-uQwcd/tY+h1jnEaze6cdX/LrhWhoBxfSknxentoqmIuStxUExxjWd3ULMLFPiFUrZKbOVMowH6Jq2FRWfmhcEw==

npm-which@^3.0.1:
version "3.0.1"
Expand Down

0 comments on commit c8e48c0

Please sign in to comment.