ehscan-react-table 0.0.17 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/elements/Table.js +4 -3
- package/package.json +1 -1
package/dist/elements/Table.js
CHANGED
|
@@ -101,14 +101,15 @@ export const Table = ({ columns, rows, sortOrder, setSortOrder, cellComponents,
|
|
|
101
101
|
const HeadColMain = ({ col }) => {
|
|
102
102
|
const { tag, search, title, width } = col;
|
|
103
103
|
const colTitle = title !== undefined ? title : tag;
|
|
104
|
-
const thWidth = width !== undefined ? `${width}px` : "
|
|
104
|
+
const thWidth = width !== undefined ? `${width}px` : "30px";
|
|
105
105
|
return (_jsx("th", { style: { "--custom-width": thWidth }, children: _jsxs("div", { className: styles.headcolcell, children: [_jsx(HeadColSort, { tag: tag }), _jsx("div", { className: styles.headcolcellmain, children: search ? _jsx(HeadSearchBar, { content: colTitle, tag: tag }) : _jsx("div", { children: colTitle }) })] }) }));
|
|
106
106
|
};
|
|
107
107
|
const HeadCols = () => {
|
|
108
108
|
return (_jsxs(_Fragment, { children: [columns.map((col, i) => {
|
|
109
|
-
const { tag, type } = col;
|
|
109
|
+
const { tag, type, width } = col;
|
|
110
|
+
const thWidth = width !== undefined ? `${width}px` : "8px";
|
|
110
111
|
if (type === "checkbox") {
|
|
111
|
-
return (_jsx("th", { className: styles.thcheckhead, style: { "--custom-width": "
|
|
112
|
+
return (_jsx("th", { className: styles.thcheckhead, style: { "--custom-width": thWidth, padding: "5px" }, children: _jsx(TableCellSelectHeadCol, { checkHead: checkHead, checkAll: checkAll }) }, `checkbox-${tag !== null && tag !== void 0 ? tag : i}`));
|
|
112
113
|
}
|
|
113
114
|
return _jsx(HeadColMain, { col: col }, tag !== null && tag !== void 0 ? tag : i);
|
|
114
115
|
}), _jsx(EndHeadCol, {})] }));
|