@uxf/data-grid 11.1.0 → 11.1.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/package.json
CHANGED
|
@@ -31,7 +31,7 @@ function useReactDataGridColumns(props, state) {
|
|
|
31
31
|
const { onReload, schema, isRowSelectable, bodyCells, actionCell } = props;
|
|
32
32
|
const columnsConfig = state.userConfig.columns;
|
|
33
33
|
return (0, react_1.useMemo)(() => {
|
|
34
|
-
var _a;
|
|
34
|
+
var _a, _b, _c, _d;
|
|
35
35
|
const columns = [];
|
|
36
36
|
if (isRowSelectable) {
|
|
37
37
|
columns.push(react_data_grid_1.SelectColumn);
|
|
@@ -47,7 +47,7 @@ function useReactDataGridColumns(props, state) {
|
|
|
47
47
|
headerCellClass: (0, cx_1.cx)("uxf-data-grid__cell", "uxf-data-grid__cell--header", `uxf-data-grid__cell--type-${schemaColumn.type}`, `uxf-data-grid__cell--name-${schemaColumn.name}`),
|
|
48
48
|
resizable: true,
|
|
49
49
|
sortable: schemaColumn.sort,
|
|
50
|
-
width: schemaColumn.width,
|
|
50
|
+
width: (_d = (_c = (_b = state.userConfig.columns) === null || _b === void 0 ? void 0 : _b[schemaColumn.name]) === null || _c === void 0 ? void 0 : _c.width) !== null && _d !== void 0 ? _d : schemaColumn.width,
|
|
51
51
|
minWidth: schemaColumn.minWidth,
|
|
52
52
|
maxWidth: schemaColumn.maxWidth,
|
|
53
53
|
cellClass: (0, cx_1.cx)("uxf-data-grid__cell", `uxf-data-grid__cell--type-${schemaColumn.type}`, `uxf-data-grid__cell--name-${schemaColumn.name}`),
|
|
@@ -79,6 +79,6 @@ function useReactDataGridColumns(props, state) {
|
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
return columns;
|
|
82
|
-
}, [columnsConfig, actionCell, schema.columns, bodyCells, isRowSelectable, onReload]);
|
|
82
|
+
}, [columnsConfig, actionCell, schema.columns, bodyCells, isRowSelectable, onReload, state.userConfig.columns]);
|
|
83
83
|
}
|
|
84
84
|
exports.useReactDataGridColumns = useReactDataGridColumns;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { ButtonVariant } from "@uxf/ui/button";
|
|
1
2
|
import React, { ReactElement } from "react";
|
|
2
3
|
export interface ToolbarCustomsProps {
|
|
3
4
|
buttons?: {
|
|
4
5
|
label: string | ReactElement;
|
|
5
6
|
onClick?: () => void;
|
|
6
7
|
href?: string;
|
|
7
|
-
variant?:
|
|
8
|
+
variant?: ButtonVariant;
|
|
8
9
|
}[];
|
|
9
10
|
}
|
|
10
11
|
export declare function ToolbarCustoms(props: ToolbarCustomsProps): React.JSX.Element | null;
|
package/types/state.d.ts
CHANGED
package/utils.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createRequest = exports.encodeFilter = exports.decodeFilter = void 0;
|
|
4
4
|
function decodeFilter(filterString) {
|
|
5
|
+
var _a, _b;
|
|
5
6
|
try {
|
|
6
7
|
const filter = JSON.parse(decodeURIComponent(escape(atob(filterString))));
|
|
7
8
|
return {
|
|
@@ -10,6 +11,8 @@ function decodeFilter(filterString) {
|
|
|
10
11
|
page: filter.page || 0,
|
|
11
12
|
dir: filter.dir || "asc",
|
|
12
13
|
sort: filter.sort || "id",
|
|
14
|
+
tab: (_a = filter.tab) !== null && _a !== void 0 ? _a : null,
|
|
15
|
+
search: (_b = filter.search) !== null && _b !== void 0 ? _b : "",
|
|
13
16
|
};
|
|
14
17
|
}
|
|
15
18
|
catch (e) {
|