@equinor/eds-data-grid-react 0.7.0 → 0.7.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.
|
@@ -586,7 +586,9 @@ function EdsDataGrid({
|
|
|
586
586
|
defaultColumn,
|
|
587
587
|
onRowClick,
|
|
588
588
|
onCellClick,
|
|
589
|
-
enableFooter
|
|
589
|
+
enableFooter,
|
|
590
|
+
enableSortingRemoval,
|
|
591
|
+
...rest
|
|
590
592
|
}) {
|
|
591
593
|
logDevelopmentWarningOfPropUse({
|
|
592
594
|
virtualHeight: {
|
|
@@ -736,7 +738,8 @@ function EdsDataGrid({
|
|
|
736
738
|
enableSubRowSelection: enableSubRowSelection ?? false,
|
|
737
739
|
enableColumnPinning: true,
|
|
738
740
|
enablePinning: true,
|
|
739
|
-
getRowId
|
|
741
|
+
getRowId,
|
|
742
|
+
enableSortingRemoval: enableSortingRemoval ?? true
|
|
740
743
|
};
|
|
741
744
|
react.useEffect(() => {
|
|
742
745
|
if (columnOrder && columnOrder.length > 0) {
|
|
@@ -856,8 +859,12 @@ function EdsDataGrid({
|
|
|
856
859
|
stickyHeader: !!stickyHeader,
|
|
857
860
|
stickyFooter: !!stickyFooter,
|
|
858
861
|
children: [/*#__PURE__*/jsxRuntime.jsxs(TableWrapper, {
|
|
859
|
-
|
|
860
|
-
|
|
862
|
+
...rest,
|
|
863
|
+
className: `table-wrapper ${rest.className ?? ''}`,
|
|
864
|
+
style: {
|
|
865
|
+
...rest.style,
|
|
866
|
+
...tableWrapperStyle
|
|
867
|
+
},
|
|
861
868
|
ref: parentRef,
|
|
862
869
|
$height: height,
|
|
863
870
|
$width: width,
|
package/dist/esm/EdsDataGrid.js
CHANGED
|
@@ -64,7 +64,9 @@ function EdsDataGrid({
|
|
|
64
64
|
defaultColumn,
|
|
65
65
|
onRowClick,
|
|
66
66
|
onCellClick,
|
|
67
|
-
enableFooter
|
|
67
|
+
enableFooter,
|
|
68
|
+
enableSortingRemoval,
|
|
69
|
+
...rest
|
|
68
70
|
}) {
|
|
69
71
|
logDevelopmentWarningOfPropUse({
|
|
70
72
|
virtualHeight: {
|
|
@@ -214,7 +216,8 @@ function EdsDataGrid({
|
|
|
214
216
|
enableSubRowSelection: enableSubRowSelection ?? false,
|
|
215
217
|
enableColumnPinning: true,
|
|
216
218
|
enablePinning: true,
|
|
217
|
-
getRowId
|
|
219
|
+
getRowId,
|
|
220
|
+
enableSortingRemoval: enableSortingRemoval ?? true
|
|
218
221
|
};
|
|
219
222
|
useEffect(() => {
|
|
220
223
|
if (columnOrder && columnOrder.length > 0) {
|
|
@@ -334,8 +337,12 @@ function EdsDataGrid({
|
|
|
334
337
|
stickyHeader: !!stickyHeader,
|
|
335
338
|
stickyFooter: !!stickyFooter,
|
|
336
339
|
children: [/*#__PURE__*/jsxs(TableWrapper, {
|
|
337
|
-
|
|
338
|
-
|
|
340
|
+
...rest,
|
|
341
|
+
className: `table-wrapper ${rest.className ?? ''}`,
|
|
342
|
+
style: {
|
|
343
|
+
...rest.style,
|
|
344
|
+
...tableWrapperStyle
|
|
345
|
+
},
|
|
339
346
|
ref: parentRef,
|
|
340
347
|
$height: height,
|
|
341
348
|
$width: width,
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
1
2
|
import { EdsDataGridProps } from './EdsDataGridProps';
|
|
2
|
-
export declare function EdsDataGrid<T>({ rows, columns, columnResizeMode, pageSize, rowSelection, enableRowSelection, enableMultiRowSelection, enableSubRowSelection, selectedRows, rowSelectionState, enableColumnFiltering, debug, enablePagination, enableSorting, stickyHeader, stickyFooter, onSelectRow, onRowSelectionChange, caption, enableVirtual, virtualHeight, columnVisibility, columnVisibilityChange, emptyMessage, columnOrder, cellClass, cellStyle, rowClass, rowStyle, headerClass, headerStyle, footerClass, footerStyle, externalPaginator, onSortingChange, manualSorting, sortingState, columnPinState, scrollbarHorizontal, width, minWidth, height, getRowId, rowVirtualizerInstanceRef, columnSizing, onColumnResize, expansionState, setExpansionState, getSubRows, defaultColumn, onRowClick, onCellClick, enableFooter, }: EdsDataGridProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function EdsDataGrid<T>({ rows, columns, columnResizeMode, pageSize, rowSelection, enableRowSelection, enableMultiRowSelection, enableSubRowSelection, selectedRows, rowSelectionState, enableColumnFiltering, debug, enablePagination, enableSorting, stickyHeader, stickyFooter, onSelectRow, onRowSelectionChange, caption, enableVirtual, virtualHeight, columnVisibility, columnVisibilityChange, emptyMessage, columnOrder, cellClass, cellStyle, rowClass, rowStyle, headerClass, headerStyle, footerClass, footerStyle, externalPaginator, onSortingChange, manualSorting, sortingState, columnPinState, scrollbarHorizontal, width, minWidth, height, getRowId, rowVirtualizerInstanceRef, columnSizing, onColumnResize, expansionState, setExpansionState, getSubRows, defaultColumn, onRowClick, onCellClick, enableFooter, enableSortingRemoval, ...rest }: EdsDataGridProps<T> & HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -253,6 +253,12 @@ type SortProps = {
|
|
|
253
253
|
* Override the default sorting state
|
|
254
254
|
*/
|
|
255
255
|
sortingState?: SortingState;
|
|
256
|
+
/**
|
|
257
|
+
* By default, the ability to remove sorting while cycling through the sorting states for a column is enabled.
|
|
258
|
+
* You can disable this behavior using the enableSortingRemoval table option.
|
|
259
|
+
* This behavior is useful if you want to ensure that at least one column is always sorted.
|
|
260
|
+
*/
|
|
261
|
+
enableSortingRemoval?: boolean;
|
|
256
262
|
};
|
|
257
263
|
type ColumnProps = {
|
|
258
264
|
columnPinState?: ColumnPinningState;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/eds-data-grid-react",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "A feature-rich data-grid written in React, implementing the Equinor Design System",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -21,24 +21,24 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@tanstack/react-table": "^8.20.1",
|
|
24
|
-
"@tanstack/react-virtual": "^3.10.
|
|
25
|
-
"@equinor/eds-tokens": "0.9.2",
|
|
24
|
+
"@tanstack/react-virtual": "^3.10.8",
|
|
26
25
|
"@equinor/eds-icons": "^0.21.0",
|
|
26
|
+
"@equinor/eds-tokens": "0.9.2",
|
|
27
27
|
"@equinor/eds-utils": "^0.8.5"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@rollup/plugin-babel": "^6.0.4",
|
|
31
|
-
"@rollup/plugin-commonjs": "^
|
|
32
|
-
"@rollup/plugin-node-resolve": "^15.
|
|
33
|
-
"@storybook/addon-a11y": "^8.
|
|
34
|
-
"@storybook/addon-actions": "^8.
|
|
35
|
-
"@storybook/addon-docs": "^8.
|
|
36
|
-
"@storybook/addon-essentials": "^8.
|
|
37
|
-
"@storybook/addon-links": "^8.
|
|
38
|
-
"@storybook/blocks": "^8.
|
|
39
|
-
"@storybook/preview-api": "^8.
|
|
40
|
-
"@storybook/react": "^8.
|
|
41
|
-
"@storybook/react-vite": "^8.
|
|
31
|
+
"@rollup/plugin-commonjs": "^27.0.0",
|
|
32
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
33
|
+
"@storybook/addon-a11y": "^8.3.4",
|
|
34
|
+
"@storybook/addon-actions": "^8.3.4",
|
|
35
|
+
"@storybook/addon-docs": "^8.3.4",
|
|
36
|
+
"@storybook/addon-essentials": "^8.3.4",
|
|
37
|
+
"@storybook/addon-links": "^8.3.4",
|
|
38
|
+
"@storybook/blocks": "^8.3.4",
|
|
39
|
+
"@storybook/preview-api": "^8.3.4",
|
|
40
|
+
"@storybook/react": "^8.3.4",
|
|
41
|
+
"@storybook/react-vite": "^8.3.4",
|
|
42
42
|
"@testing-library/dom": "^10.4.0",
|
|
43
43
|
"@testing-library/jest-dom": "^6.4.8",
|
|
44
44
|
"@testing-library/react": "16.0.0",
|
|
@@ -48,7 +48,6 @@
|
|
|
48
48
|
"@types/ramda": "^0.30.1",
|
|
49
49
|
"@types/react": "^18.3.3",
|
|
50
50
|
"@types/react-dom": "^18.3.0",
|
|
51
|
-
"babel-loader": "^9.1.3",
|
|
52
51
|
"babel-plugin-styled-components": "^2.1.4",
|
|
53
52
|
"jest": "29.7.0",
|
|
54
53
|
"jest-environment-jsdom": "29.7.0",
|
|
@@ -59,10 +58,10 @@
|
|
|
59
58
|
"react": "^18.3.1",
|
|
60
59
|
"react-dom": "^18.3.1",
|
|
61
60
|
"react-hook-form": "^7.52.2",
|
|
62
|
-
"rollup": "^4.
|
|
63
|
-
"rollup-plugin-delete": "^2.
|
|
61
|
+
"rollup": "^4.22.5",
|
|
62
|
+
"rollup-plugin-delete": "^2.1.0",
|
|
64
63
|
"rollup-plugin-postcss": "^4.0.2",
|
|
65
|
-
"storybook": "^8.
|
|
64
|
+
"storybook": "^8.3.4",
|
|
66
65
|
"styled-components": "6.1.12",
|
|
67
66
|
"ts-jest": "29.2.4",
|
|
68
67
|
"ts-node": "10.9.2",
|