@ackplus/react-tanstack-data-table 1.0.23 → 1.0.24-b-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
|
@@ -18,6 +18,7 @@ const pagination_1 = require("../pagination");
|
|
|
18
18
|
const rows_1 = require("../rows");
|
|
19
19
|
const toolbar_1 = require("../toolbar");
|
|
20
20
|
const special_columns_utils_1 = require("../../utils/special-columns.utils");
|
|
21
|
+
const lodash_1 = require("lodash");
|
|
21
22
|
const DEFAULT_INITIAL_STATE = {
|
|
22
23
|
sorting: [],
|
|
23
24
|
pagination: {
|
|
@@ -143,6 +144,7 @@ exports.DataTable = (0, react_1.forwardRef)(function DataTable({ initialState, c
|
|
|
143
144
|
}), [tableWidth]);
|
|
144
145
|
const fetchData = (0, react_1.useCallback)((...args_1) => tslib_1.__awaiter(this, [...args_1], void 0, function* (overrides = {}) {
|
|
145
146
|
var _a, _b;
|
|
147
|
+
console.info('fetchData', (0, lodash_1.cloneDeep)(overrides), (0, lodash_1.cloneDeep)(columnFilter), (0, lodash_1.cloneDeep)(sorting), (0, lodash_1.cloneDeep)(pagination));
|
|
146
148
|
if (!onFetchData) {
|
|
147
149
|
if (fetchLogger.isLevelEnabled('debug')) {
|
|
148
150
|
fetchLogger.debug('onFetchData not provided, skipping fetch', { overrides });
|
|
@@ -718,11 +720,14 @@ exports.DataTable = (0, react_1.forwardRef)(function DataTable({ initialState, c
|
|
|
718
720
|
refresh: () => {
|
|
719
721
|
var _a, _b;
|
|
720
722
|
const filters = table.getState();
|
|
723
|
+
console.info('filters', (0, lodash_1.cloneDeep)(filters));
|
|
721
724
|
const pagination = {
|
|
722
725
|
pageIndex: 0,
|
|
723
726
|
pageSize: ((_a = filters.pagination) === null || _a === void 0 ? void 0 : _a.pageSize) || ((_b = initialStateConfig.pagination) === null || _b === void 0 ? void 0 : _b.pageSize) || 10,
|
|
724
727
|
};
|
|
728
|
+
console.info('pagination', (0, lodash_1.cloneDeep)(pagination));
|
|
725
729
|
const allState = table.getState();
|
|
730
|
+
console.info('allState', (0, lodash_1.cloneDeep)(allState));
|
|
726
731
|
setPagination(pagination);
|
|
727
732
|
onDataStateChange === null || onDataStateChange === void 0 ? void 0 : onDataStateChange(allState);
|
|
728
733
|
fetchData === null || fetchData === void 0 ? void 0 : fetchData({ pagination });
|