@bsol-oss/react-datatable5 3.4.5 → 3.4.6
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.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -987,7 +987,6 @@ const useDataTable = (props) => {
|
|
|
987
987
|
const useDataTableServer = (props) => {
|
|
988
988
|
const { url, onFetchSuccess = () => { }, default: defaultState, debounce = true, debounceDelay = 1000, } = props;
|
|
989
989
|
const { sorting: defaultSorting, pagination: defaultPagination, rowSelection: defaultRowSelection, columnFilters: defaultColumnFilters, columnOrder: defaultColumnOrder, columnVisibility: defaultColumnVisibility, globalFilter: defaultGlobalFilter, density: defaultDensity, } = defaultState || {};
|
|
990
|
-
const { pageIndex, pageSize } = defaultPagination || { pageIndex: 0, pageSize: 10 };
|
|
991
990
|
const [sorting, setSorting] = react$1.useState(defaultSorting || []);
|
|
992
991
|
const [columnFilters, setColumnFilters] = react$1.useState(defaultColumnFilters || []);
|
|
993
992
|
const [pagination, setPagination] = react$1.useState(defaultPagination || { pageIndex: 0, pageSize: 10 });
|
|
@@ -1021,6 +1020,7 @@ const useDataTableServer = (props) => {
|
|
|
1021
1020
|
disableFirstFetch: true,
|
|
1022
1021
|
onFetchSuccess: onFetchSuccess,
|
|
1023
1022
|
});
|
|
1023
|
+
const { pageIndex, pageSize } = pagination;
|
|
1024
1024
|
react$1.useEffect(() => {
|
|
1025
1025
|
refreshData({ debounce, delay: debounceDelay });
|
|
1026
1026
|
console.debug("refreshData", pageIndex, pageSize, sorting, columnFilters, globalFilter, url);
|
package/dist/index.mjs
CHANGED
|
@@ -985,7 +985,6 @@ const useDataTable = (props) => {
|
|
|
985
985
|
const useDataTableServer = (props) => {
|
|
986
986
|
const { url, onFetchSuccess = () => { }, default: defaultState, debounce = true, debounceDelay = 1000, } = props;
|
|
987
987
|
const { sorting: defaultSorting, pagination: defaultPagination, rowSelection: defaultRowSelection, columnFilters: defaultColumnFilters, columnOrder: defaultColumnOrder, columnVisibility: defaultColumnVisibility, globalFilter: defaultGlobalFilter, density: defaultDensity, } = defaultState || {};
|
|
988
|
-
const { pageIndex, pageSize } = defaultPagination || { pageIndex: 0, pageSize: 10 };
|
|
989
988
|
const [sorting, setSorting] = useState(defaultSorting || []);
|
|
990
989
|
const [columnFilters, setColumnFilters] = useState(defaultColumnFilters || []);
|
|
991
990
|
const [pagination, setPagination] = useState(defaultPagination || { pageIndex: 0, pageSize: 10 });
|
|
@@ -1019,6 +1018,7 @@ const useDataTableServer = (props) => {
|
|
|
1019
1018
|
disableFirstFetch: true,
|
|
1020
1019
|
onFetchSuccess: onFetchSuccess,
|
|
1021
1020
|
});
|
|
1021
|
+
const { pageIndex, pageSize } = pagination;
|
|
1022
1022
|
useEffect(() => {
|
|
1023
1023
|
refreshData({ debounce, delay: debounceDelay });
|
|
1024
1024
|
console.debug("refreshData", pageIndex, pageSize, sorting, columnFilters, globalFilter, url);
|