Skip to content

Commit

Permalink
allow to override default column size for the first column (#329)
Browse files Browse the repository at this point in the history
* allow to override default column size for the first column

* 3.2.33
  • Loading branch information
jackthecodemonkey authored Aug 20, 2024
1 parent 701e83b commit 069a89b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions lib/components/Table/const.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/* eslint-disable import/prefer-default-export */
export const DEFAULT_COLUMN_SIZE = 200;
4 changes: 3 additions & 1 deletion lib/components/Table/getExpandColumnConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -100,6 +101,7 @@ export default (firstCol, tableConfig) => ({
</Flex>
),
enableResizing: true,
size: 200
size: firstCol.size || DEFAULT_COLUMN_SIZE,
...(firstCol.grow ? { grow: firstCol.grow } : {})
}
});
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "orcs-design-system",
"version": "3.2.32",
"version": "3.2.33",
"engines": {
"node": "20.12.2"
},
Expand Down

0 comments on commit 069a89b

Please sign in to comment.