diff --git a/lib/components/Table/const.js b/lib/components/Table/const.js new file mode 100644 index 00000000..28c46780 --- /dev/null +++ b/lib/components/Table/const.js @@ -0,0 +1,2 @@ +/* eslint-disable import/prefer-default-export */ +export const DEFAULT_COLUMN_SIZE = 200; diff --git a/lib/components/Table/getExpandColumnConfig.js b/lib/components/Table/getExpandColumnConfig.js index f4133bb8..4ecb3767 100644 --- a/lib/components/Table/getExpandColumnConfig.js +++ b/lib/components/Table/getExpandColumnConfig.js @@ -6,6 +6,7 @@ import Flex from "../Flex"; import { get } from "lodash"; import styled from "styled-components"; import { PropTypes } from "prop-types"; +import { DEFAULT_COLUMN_SIZE } from "./const"; const StyledHighlight = styled.span` background-color: ${(props) => props.matchHighlightColor}; @@ -100,6 +101,7 @@ export default (firstCol, tableConfig) => ({ ), enableResizing: true, - size: 200 + size: firstCol.size || DEFAULT_COLUMN_SIZE, + ...(firstCol.grow ? { grow: firstCol.grow } : {}) } }); diff --git a/package-lock.json b/package-lock.json index 78bdcb6a..4c5e24d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "orcs-design-system", - "version": "3.2.32", + "version": "3.2.33", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/package.json b/package.json index 60651c13..d3bc79f4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orcs-design-system", - "version": "3.2.32", + "version": "3.2.33", "engines": { "node": "20.12.2" },