@indico-data/design-system 2.59.0 → 2.59.1
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/lib/components/tanstackTable/TanstackTable.stories.d.ts +1 -1
- package/lib/components/tanstackTable/docs/pinnedColumns/PinnedColumn.stories.d.ts +1 -1
- package/lib/components/tanstackTable/docs/withRowClick/WithRowClick.stories.d.ts +1 -1
- package/lib/components/tanstackTable/index.d.ts +1 -1
- package/lib/index.esm.js +8 -6
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +8 -6
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/tanstackTable/TanstackTable.stories.tsx +1 -1
- package/src/components/tanstackTable/{TanstakTable.tsx → TanstackTable.tsx} +15 -10
- package/src/components/tanstackTable/__tests__/TanstackTable.test.tsx +1 -1
- package/src/components/tanstackTable/docs/pinnedColumns/PinnedColumn.stories.tsx +1 -1
- package/src/components/tanstackTable/docs/withRowClick/WithRowClick.stories.tsx +1 -1
- package/src/components/tanstackTable/index.ts +1 -1
- /package/lib/components/tanstackTable/{TanstakTable.d.ts → TanstackTable.d.ts} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export type { ColumnDef, Row, Table } from '@tanstack/react-table';
|
|
2
|
-
export { TanstackTable } from './
|
|
2
|
+
export { TanstackTable } from './TanstackTable';
|
package/lib/index.esm.js
CHANGED
|
@@ -41318,14 +41318,16 @@ function TanstackTable(_a) {
|
|
|
41318
41318
|
defaultColumns,
|
|
41319
41319
|
});
|
|
41320
41320
|
const thRefs = useRef({});
|
|
41321
|
-
//
|
|
41321
|
+
// Auto-compute column widths based on current table header cell widths for columns without a defined size.
|
|
41322
41322
|
useEffect(() => {
|
|
41323
|
-
|
|
41324
|
-
|
|
41323
|
+
setFormattedColumns(formattedColumns.map((column) => {
|
|
41324
|
+
var _a;
|
|
41325
|
+
if ((_a = column.meta) === null || _a === void 0 ? void 0 : _a.styles.definedColumnSize) {
|
|
41326
|
+
return column;
|
|
41327
|
+
}
|
|
41325
41328
|
const columnWidth = thRefs.current[column.id].offsetWidth;
|
|
41326
|
-
|
|
41327
|
-
});
|
|
41328
|
-
setFormattedColumns(updatedColumns);
|
|
41329
|
+
return Object.assign(Object.assign({}, column), { size: columnWidth });
|
|
41330
|
+
}));
|
|
41329
41331
|
}, [data, columns, windowWidth]);
|
|
41330
41332
|
const table = useReactTable(Object.assign(Object.assign({}, rest), { data: data !== null && data !== void 0 ? data : defaultData, columns: formattedColumns, state: {
|
|
41331
41333
|
rowSelection,
|