@trackunit/react-graphql-hooks 0.0.7 → 0.0.9-alpha-71e42cacef.0
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/index.cjs.js +2 -2
- package/index.esm.js +1 -1
- package/package.json +2 -2
- package/src/usePaginationQuery.d.ts +1 -1
package/index.cjs.js
CHANGED
|
@@ -6,7 +6,7 @@ require('react/jsx-runtime');
|
|
|
6
6
|
var i18nLibraryTranslation = require('@trackunit/i18n-library-translation');
|
|
7
7
|
var sharedUtils = require('@trackunit/shared-utils');
|
|
8
8
|
var ApolloClient = require('@apollo/client');
|
|
9
|
-
var
|
|
9
|
+
var reactTablePagination = require('@trackunit/react-table-pagination');
|
|
10
10
|
var react = require('react');
|
|
11
11
|
|
|
12
12
|
function _interopNamespace(e) {
|
|
@@ -152,7 +152,7 @@ const usePaginationQuery = (document, props) => {
|
|
|
152
152
|
const onReset = react.useCallback(() => {
|
|
153
153
|
setResetTrigger(prev => prev + 1);
|
|
154
154
|
}, []);
|
|
155
|
-
const { table: { setIsLoading, isLoading, setPageInfo, pageInfo, reset, nextPage, previousPage }, variables: { first, after }, } =
|
|
155
|
+
const { table: { setIsLoading, isLoading, setPageInfo, pageInfo, reset, nextPage, previousPage }, variables: { first, after }, } = reactTablePagination.useRelayPagination({
|
|
156
156
|
pageSize: props.pageSize || 50,
|
|
157
157
|
onReset,
|
|
158
158
|
});
|
package/index.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ import 'react/jsx-runtime';
|
|
|
2
2
|
import { registerTranslations } from '@trackunit/i18n-library-translation';
|
|
3
3
|
import { truthy } from '@trackunit/shared-utils';
|
|
4
4
|
import * as ApolloClient from '@apollo/client';
|
|
5
|
-
import { useRelayPagination } from '@trackunit/react-table';
|
|
5
|
+
import { useRelayPagination } from '@trackunit/react-table-pagination';
|
|
6
6
|
import { useState, useCallback, useEffect, useMemo } from 'react';
|
|
7
7
|
|
|
8
8
|
var defaultTranslations = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-graphql-hooks",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9-alpha-71e42cacef.0",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"react": "^18.2.0",
|
|
12
12
|
"@trackunit/i18n-library-translation": "*",
|
|
13
13
|
"@trackunit/shared-utils": "*",
|
|
14
|
-
"@trackunit/react-table": "*"
|
|
14
|
+
"@trackunit/react-table-pagination": "*"
|
|
15
15
|
},
|
|
16
16
|
"module": "./index.esm.js",
|
|
17
17
|
"main": "./index.cjs.js"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as ApolloClient from "@apollo/client";
|
|
2
|
-
import { RelayPageInfo, RelayTableSupport } from "@trackunit/react-table";
|
|
2
|
+
import { RelayPageInfo, RelayTableSupport } from "@trackunit/react-table-pagination";
|
|
3
3
|
/**
|
|
4
4
|
* This type is used to return the data from the query, the pagination object and the last fetched data.
|
|
5
5
|
*/
|