@mkt-loitd/react-table-grid-custom 1.3.5 → 1.3.7
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/index.d.mts +6 -3
- package/dist/index.d.ts +6 -3
- package/dist/index.js +10 -7
- package/dist/index.mjs +10 -7
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -33,12 +33,11 @@ interface useShowHideColumnReturn<T, SR> {
|
|
|
33
33
|
|
|
34
34
|
declare const useShowHideColumn: <T, SR = unknown>({ nameLocal, columns, ignoreColumns }: useShowHideColumnParameter<T, SR>) => useShowHideColumnReturn<T, SR>;
|
|
35
35
|
|
|
36
|
-
interface IReactTableGridCustom<T = unknown, SR = unknown, K extends Key = Key> extends Omit<DataGridProps<T, SR, K>, 'rows' | 'rowKeyGetter'> {
|
|
36
|
+
interface IReactTableGridCustom<T = unknown, SR = unknown, K extends Key = Key> extends Omit<DataGridProps<T, SR, K>, 'rows' | 'rowKeyGetter' | 'renderers' | 'children'> {
|
|
37
37
|
classNameWapperTable?: string;
|
|
38
38
|
classNamePaginationTable?: string;
|
|
39
39
|
hiddenPagination?: boolean;
|
|
40
40
|
hiddenSTT?: boolean;
|
|
41
|
-
/** Pagination */
|
|
42
41
|
page?: number;
|
|
43
42
|
pageSize?: number;
|
|
44
43
|
total?: number;
|
|
@@ -47,7 +46,11 @@ interface IReactTableGridCustom<T = unknown, SR = unknown, K extends Key = Key>
|
|
|
47
46
|
setConfigPagination?: Dispatch<SetStateAction<ISetConfigPagination$1>>;
|
|
48
47
|
rowKeyGetter?: string | ((row: T) => K);
|
|
49
48
|
hiddenPaginationText?: boolean;
|
|
50
|
-
paginationText?: (obj:
|
|
49
|
+
paginationText?: (obj: {
|
|
50
|
+
page?: number;
|
|
51
|
+
pageSize?: number;
|
|
52
|
+
total?: number;
|
|
53
|
+
}) => ReactNode;
|
|
51
54
|
listPageSize?: string[];
|
|
52
55
|
fetching?: boolean;
|
|
53
56
|
TableLogo?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -33,12 +33,11 @@ interface useShowHideColumnReturn<T, SR> {
|
|
|
33
33
|
|
|
34
34
|
declare const useShowHideColumn: <T, SR = unknown>({ nameLocal, columns, ignoreColumns }: useShowHideColumnParameter<T, SR>) => useShowHideColumnReturn<T, SR>;
|
|
35
35
|
|
|
36
|
-
interface IReactTableGridCustom<T = unknown, SR = unknown, K extends Key = Key> extends Omit<DataGridProps<T, SR, K>, 'rows' | 'rowKeyGetter'> {
|
|
36
|
+
interface IReactTableGridCustom<T = unknown, SR = unknown, K extends Key = Key> extends Omit<DataGridProps<T, SR, K>, 'rows' | 'rowKeyGetter' | 'renderers' | 'children'> {
|
|
37
37
|
classNameWapperTable?: string;
|
|
38
38
|
classNamePaginationTable?: string;
|
|
39
39
|
hiddenPagination?: boolean;
|
|
40
40
|
hiddenSTT?: boolean;
|
|
41
|
-
/** Pagination */
|
|
42
41
|
page?: number;
|
|
43
42
|
pageSize?: number;
|
|
44
43
|
total?: number;
|
|
@@ -47,7 +46,11 @@ interface IReactTableGridCustom<T = unknown, SR = unknown, K extends Key = Key>
|
|
|
47
46
|
setConfigPagination?: Dispatch<SetStateAction<ISetConfigPagination$1>>;
|
|
48
47
|
rowKeyGetter?: string | ((row: T) => K);
|
|
49
48
|
hiddenPaginationText?: boolean;
|
|
50
|
-
paginationText?: (obj:
|
|
49
|
+
paginationText?: (obj: {
|
|
50
|
+
page?: number;
|
|
51
|
+
pageSize?: number;
|
|
52
|
+
total?: number;
|
|
53
|
+
}) => ReactNode;
|
|
51
54
|
listPageSize?: string[];
|
|
52
55
|
fetching?: boolean;
|
|
53
56
|
TableLogo?: string;
|
package/dist/index.js
CHANGED
|
@@ -287,7 +287,10 @@ var ReactTableGridCustomInner = (props, ref) => {
|
|
|
287
287
|
rowKeyGetter = "uid",
|
|
288
288
|
selectedRows,
|
|
289
289
|
fetching,
|
|
290
|
-
|
|
290
|
+
// ❌ loại bỏ để tránh warning
|
|
291
|
+
children,
|
|
292
|
+
renderers,
|
|
293
|
+
...restProps
|
|
291
294
|
} = props;
|
|
292
295
|
const [isLoading, setIsLoading] = (0, import_react2.useState)(true);
|
|
293
296
|
const [sortColumns, setSortColumns] = (0, import_react2.useState)([]);
|
|
@@ -357,16 +360,16 @@ var ReactTableGridCustomInner = (props, ref) => {
|
|
|
357
360
|
import_core.Checkbox,
|
|
358
361
|
{
|
|
359
362
|
...props2,
|
|
360
|
-
checked:
|
|
361
|
-
onChange: (e) =>
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
363
|
+
checked: Boolean(checked),
|
|
364
|
+
onChange: (e) => onChange(
|
|
365
|
+
e.currentTarget.checked,
|
|
366
|
+
e.nativeEvent instanceof MouseEvent ? e.nativeEvent.shiftKey : false
|
|
367
|
+
)
|
|
365
368
|
}
|
|
366
369
|
);
|
|
367
370
|
}
|
|
368
371
|
},
|
|
369
|
-
...
|
|
372
|
+
...restProps
|
|
370
373
|
}
|
|
371
374
|
),
|
|
372
375
|
(fetching || isLoading) && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(LoadingIcon, { isSpin: true }) })
|
package/dist/index.mjs
CHANGED
|
@@ -258,7 +258,10 @@ var ReactTableGridCustomInner = (props, ref) => {
|
|
|
258
258
|
rowKeyGetter = "uid",
|
|
259
259
|
selectedRows,
|
|
260
260
|
fetching,
|
|
261
|
-
|
|
261
|
+
// ❌ loại bỏ để tránh warning
|
|
262
|
+
children,
|
|
263
|
+
renderers,
|
|
264
|
+
...restProps
|
|
262
265
|
} = props;
|
|
263
266
|
const [isLoading, setIsLoading] = useState2(true);
|
|
264
267
|
const [sortColumns, setSortColumns] = useState2([]);
|
|
@@ -328,16 +331,16 @@ var ReactTableGridCustomInner = (props, ref) => {
|
|
|
328
331
|
Checkbox,
|
|
329
332
|
{
|
|
330
333
|
...props2,
|
|
331
|
-
checked:
|
|
332
|
-
onChange: (e) =>
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
334
|
+
checked: Boolean(checked),
|
|
335
|
+
onChange: (e) => onChange(
|
|
336
|
+
e.currentTarget.checked,
|
|
337
|
+
e.nativeEvent instanceof MouseEvent ? e.nativeEvent.shiftKey : false
|
|
338
|
+
)
|
|
336
339
|
}
|
|
337
340
|
);
|
|
338
341
|
}
|
|
339
342
|
},
|
|
340
|
-
...
|
|
343
|
+
...restProps
|
|
341
344
|
}
|
|
342
345
|
),
|
|
343
346
|
(fetching || isLoading) && /* @__PURE__ */ jsx3("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx3(LoadingIcon, { isSpin: true }) })
|