@ackplus/react-tanstack-data-table 1.0.28 → 1.0.29
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
|
@@ -66,11 +66,11 @@ exports.DataTable = (0, react_1.forwardRef)(function DataTable({ initialState, c
|
|
|
66
66
|
}, [logger, dataMode, paginationMode, filterMode, sortingMode]);
|
|
67
67
|
const initialStateConfig = (0, react_1.useMemo)(() => {
|
|
68
68
|
const config = Object.assign(Object.assign({}, DEFAULT_INITIAL_STATE), initialState);
|
|
69
|
-
if (
|
|
70
|
-
|
|
69
|
+
if (logger.isLevelEnabled('info')) {
|
|
70
|
+
logger.info('initialStateConfig', { config });
|
|
71
71
|
}
|
|
72
72
|
return config;
|
|
73
|
-
}, [initialState,
|
|
73
|
+
}, [initialState, logger]);
|
|
74
74
|
const [sorting, setSorting] = (0, react_1.useState)((initialState === null || initialState === void 0 ? void 0 : initialState.sorting) || DEFAULT_INITIAL_STATE.sorting);
|
|
75
75
|
const [pagination, setPagination] = (0, react_1.useState)((initialState === null || initialState === void 0 ? void 0 : initialState.pagination) || DEFAULT_INITIAL_STATE.pagination);
|
|
76
76
|
const [globalFilter, setGlobalFilter] = (0, react_1.useState)((initialState === null || initialState === void 0 ? void 0 : initialState.globalFilter) || DEFAULT_INITIAL_STATE.globalFilter);
|
|
@@ -100,8 +100,8 @@ exports.DataTable = (0, react_1.forwardRef)(function DataTable({ initialState, c
|
|
|
100
100
|
columnsMap = [selectionColumnMap, ...columnsMap];
|
|
101
101
|
}
|
|
102
102
|
const enhancedColumns = (0, utils_1.withIdsDeep)(columnsMap);
|
|
103
|
-
if (
|
|
104
|
-
|
|
103
|
+
if (logger.isLevelEnabled('info')) {
|
|
104
|
+
logger.info('enhancedColumns', { enhancedColumns });
|
|
105
105
|
}
|
|
106
106
|
return enhancedColumns;
|
|
107
107
|
}, [columns, enableExpanding, enableRowSelection, enableMultiRowSelection, slotProps === null || slotProps === void 0 ? void 0 : slotProps.expandColumn, slotProps === null || slotProps === void 0 ? void 0 : slotProps.selectionColumn]);
|
|
@@ -154,13 +154,13 @@ exports.DataTable = (0, react_1.forwardRef)(function DataTable({ initialState, c
|
|
|
154
154
|
pagination,
|
|
155
155
|
columnFilter,
|
|
156
156
|
sorting }, overrides);
|
|
157
|
-
if (fetchLogger.isLevelEnabled('
|
|
158
|
-
fetchLogger.
|
|
157
|
+
if (fetchLogger.isLevelEnabled('info')) {
|
|
158
|
+
fetchLogger.info('Requesting data', { filters });
|
|
159
159
|
}
|
|
160
160
|
try {
|
|
161
161
|
const result = yield debouncedFetch(filters);
|
|
162
|
-
if (fetchLogger.isLevelEnabled('
|
|
163
|
-
fetchLogger.
|
|
162
|
+
if (fetchLogger.isLevelEnabled('info')) {
|
|
163
|
+
fetchLogger.info('Fetch resolved', {
|
|
164
164
|
rows: (_b = (_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0,
|
|
165
165
|
total: result === null || result === void 0 ? void 0 : result.total,
|
|
166
166
|
});
|