Skip to content

Commit 069a89b

Browse files
allow to override default column size for the first column (#329)
* allow to override default column size for the first column * 3.2.33
1 parent 701e83b commit 069a89b

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

lib/components/Table/const.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/* eslint-disable import/prefer-default-export */
2+
export const DEFAULT_COLUMN_SIZE = 200;

lib/components/Table/getExpandColumnConfig.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Flex from "../Flex";
66
import { get } from "lodash";
77
import styled from "styled-components";
88
import { PropTypes } from "prop-types";
9+
import { DEFAULT_COLUMN_SIZE } from "./const";
910

1011
const StyledHighlight = styled.span`
1112
background-color: ${(props) => props.matchHighlightColor};
@@ -100,6 +101,7 @@ export default (firstCol, tableConfig) => ({
100101
</Flex>
101102
),
102103
enableResizing: true,
103-
size: 200
104+
size: firstCol.size || DEFAULT_COLUMN_SIZE,
105+
...(firstCol.grow ? { grow: firstCol.grow } : {})
104106
}
105107
});

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "orcs-design-system",
3-
"version": "3.2.32",
3+
"version": "3.2.33",
44
"engines": {
55
"node": "20.12.2"
66
},

0 commit comments

Comments
 (0)