@synerise/ds-table-new 1.4.5 → 1.5.0
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.5.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-table-new@1.4.5...@synerise/ds-table-new@1.5.0) (2026-06-22)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **table-new:** extend maxHeight prop to default table component ([c99b632](https://github.com/Synerise/synerise-design/commit/c99b632f9a1ba1b6e8c62822512c827eb238743c))
|
|
11
|
+
|
|
6
12
|
## [1.4.5](https://github.com/Synerise/synerise-design/compare/@synerise/ds-table-new@1.4.4...@synerise/ds-table-new@1.4.5) (2026-06-17)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package @synerise/ds-table-new
|
package/dist/Table.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { TableProps } from './Table.types';
|
|
3
|
-
export declare const Table: <TData extends object, TValue>({ data, columns, texts: defaultTexts, selectionConfig, isLoading, selectedRowKeys, pagination, matchesSearchQuery, filterData, onSearchQueryChange, searchProps, expandable, rowKey, onSort, tableRef, stickyHeader, ...props }: TableProps<TData, TValue>) => React.JSX.Element;
|
|
3
|
+
export declare const Table: <TData extends object, TValue>({ data, columns, texts: defaultTexts, selectionConfig, isLoading, selectedRowKeys, pagination, matchesSearchQuery, filterData, onSearchQueryChange, searchProps, expandable, rowKey, onSort, tableRef, stickyHeader, maxHeight, ...props }: TableProps<TData, TValue>) => React.JSX.Element;
|
package/dist/Table.js
CHANGED
|
@@ -27,6 +27,7 @@ const Table = ({
|
|
|
27
27
|
onSort,
|
|
28
28
|
tableRef,
|
|
29
29
|
stickyHeader,
|
|
30
|
+
maxHeight,
|
|
30
31
|
...props
|
|
31
32
|
}) => {
|
|
32
33
|
const texts = useDefaultTexts(defaultTexts);
|
|
@@ -80,7 +81,7 @@ const Table = ({
|
|
|
80
81
|
stickyData,
|
|
81
82
|
setStickyData
|
|
82
83
|
} : null, [stickyData, stickyHeader]);
|
|
83
|
-
return /* @__PURE__ */ jsx(TableContext.Provider, { value: tableContextValue, children: /* @__PURE__ */ jsx(StickyContext.Provider, { value: stickyValue, children: /* @__PURE__ */ jsx(SelectionContext.Provider, { value: selectionConfig, children: /* @__PURE__ */ jsx(BaseTable, { texts, isLoading: effectiveIsLoading, hasPagination, paginationProps, tableOuterRef: wrapperRef, selectedRowKeys, columnSizing, isColumnSizingReady, searchQuery, setSearchQuery, handleSearchClear, hasBuiltInSearch, searchProps, dataSourceTotalCount: totalDataCount, expandable, ...props }) }) }) });
|
|
84
|
+
return /* @__PURE__ */ jsx(TableContext.Provider, { value: tableContextValue, children: /* @__PURE__ */ jsx(StickyContext.Provider, { value: stickyValue, children: /* @__PURE__ */ jsx(SelectionContext.Provider, { value: selectionConfig, children: /* @__PURE__ */ jsx(BaseTable, { texts, isLoading: effectiveIsLoading, hasPagination, paginationProps, tableOuterRef: wrapperRef, selectedRowKeys, columnSizing, isColumnSizingReady, searchQuery, setSearchQuery, handleSearchClear, hasBuiltInSearch, searchProps, dataSourceTotalCount: totalDataCount, expandable, withBodyScroll: !!maxHeight, maxHeight, ...props }) }) }) });
|
|
84
85
|
};
|
|
85
86
|
export {
|
|
86
87
|
Table
|
package/dist/Table.types.d.ts
CHANGED
|
@@ -112,6 +112,8 @@ export type SharedTableProps<TData, TValue> = {
|
|
|
112
112
|
columns: ColumnDef<TData, TValue>[];
|
|
113
113
|
dataSourceTotalCount?: number;
|
|
114
114
|
expandable?: Expandable<TData>;
|
|
115
|
+
/** max-height (px) for the built-in scroll container. Ignored when scrollElementRef is provided. Defaults to 800. */
|
|
116
|
+
maxHeight?: number;
|
|
115
117
|
onRowClick?: (row: TData, event: MouseEvent<HTMLTableRowElement>) => void;
|
|
116
118
|
/**
|
|
117
119
|
* Returns arbitrary HTML attributes (style, className, data-*, event handlers, etc.)
|
|
@@ -353,8 +355,6 @@ export type VirtualTableRef = {
|
|
|
353
355
|
highlightRow: (rowKey: string, options?: HighlightOptions) => void;
|
|
354
356
|
};
|
|
355
357
|
type VirtualProps = {
|
|
356
|
-
/** max-height (px) for the built-in scroll container. Ignored when scrollElementRef is provided. Defaults to 800. */
|
|
357
|
-
maxHeight?: number;
|
|
358
358
|
tableRef?: RefObject<VirtualTableRef>;
|
|
359
359
|
/**
|
|
360
360
|
* uses body virtualisation
|
|
@@ -8,11 +8,11 @@ const TablePagination = ({
|
|
|
8
8
|
const {
|
|
9
9
|
table
|
|
10
10
|
} = useTableContext();
|
|
11
|
-
return /* @__PURE__ */ jsx(PaginationWrapper, { "data-testid": "ds-table-pagination", children: /* @__PURE__ */ jsx(Pagination, { hideOnSinglePage: true,
|
|
11
|
+
return /* @__PURE__ */ jsx(PaginationWrapper, { "data-testid": "ds-table-pagination", children: /* @__PURE__ */ jsx(Pagination, { hideOnSinglePage: true, ...rest, total: table.getRowCount(), onShowSizeChange: (_current, size) => {
|
|
12
12
|
table.setPageSize(size);
|
|
13
13
|
}, onChange: (page) => {
|
|
14
14
|
table.setPageIndex(page - 1);
|
|
15
|
-
},
|
|
15
|
+
}, pageSize: table.getState().pagination.pageSize }) });
|
|
16
16
|
};
|
|
17
17
|
export {
|
|
18
18
|
TablePagination
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-table-new",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "TableNew UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"react-intl": ">= 3.12.0 <= 6.8",
|
|
81
81
|
"styled-components": "^5.3.3"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "d71e1daf33593c1e9d8959942a6caa5d8db981fc"
|
|
84
84
|
}
|