@etsoo/react 1.8.6 → 1.8.8

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.
@@ -1,4 +1,4 @@
1
- import { QueryPagingData } from "@etsoo/appscript";
1
+ import { QueryPagingData, QueryPagingOrder } from "@etsoo/appscript";
2
2
  import { DataTypes } from "@etsoo/shared";
3
3
  /**
4
4
  * Grid size
@@ -68,7 +68,7 @@ export interface GridLoader<T extends object> {
68
68
  /**
69
69
  * Default order by
70
70
  */
71
- defaultOrderBy?: Map<string, boolean>;
71
+ defaultOrderBy?: QueryPagingOrder[];
72
72
  /**
73
73
  * Batch size when load data, default will be calcuated with height and itemSize
74
74
  */
@@ -125,6 +125,7 @@ export const ScrollerGrid = (props) => {
125
125
  hasNextPage: true,
126
126
  isNextPageLoading: false,
127
127
  lastLoadedItems: undefined,
128
+ lastItem: undefined,
128
129
  ...rest
129
130
  };
130
131
  Object.assign(refs.current, resetState);
@@ -117,10 +117,11 @@ export const ScrollerList = (props) => {
117
117
  const { queryPaging, ...rest } = add ?? {};
118
118
  const resetState = {
119
119
  autoLoad: true,
120
- lastLoadedItems: undefined,
121
120
  loadedItems: 0,
122
121
  hasNextPage: true,
123
122
  isNextPageLoading: false,
123
+ lastLoadedItems: undefined,
124
+ lastItem: undefined,
124
125
  ...rest
125
126
  };
126
127
  Object.assign(stateRefs.current, resetState);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/react",
3
- "version": "1.8.6",
3
+ "version": "1.8.8",
4
4
  "description": "TypeScript ReactJs UI Independent Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -48,12 +48,12 @@
48
48
  "@emotion/css": "^11.13.5",
49
49
  "@emotion/react": "^11.13.5",
50
50
  "@emotion/styled": "^11.13.5",
51
- "@etsoo/appscript": "^1.5.77",
51
+ "@etsoo/appscript": "^1.5.78",
52
52
  "@etsoo/notificationbase": "^1.1.54",
53
53
  "@etsoo/shared": "^1.2.55",
54
54
  "react": "^18.3.1",
55
55
  "react-dom": "^18.3.1",
56
- "react-router-dom": "^7.0.1",
56
+ "react-router-dom": "^7.0.2",
57
57
  "react-window": "^1.8.10"
58
58
  },
59
59
  "devDependencies": {
@@ -1,4 +1,4 @@
1
- import { QueryPagingData } from "@etsoo/appscript";
1
+ import { QueryPagingData, QueryPagingOrder } from "@etsoo/appscript";
2
2
  import { DataTypes, DomUtils } from "@etsoo/shared";
3
3
 
4
4
  /**
@@ -106,7 +106,7 @@ export interface GridLoader<T extends object> {
106
106
  /**
107
107
  * Default order by
108
108
  */
109
- defaultOrderBy?: Map<string, boolean>;
109
+ defaultOrderBy?: QueryPagingOrder[];
110
110
 
111
111
  /**
112
112
  * Batch size when load data, default will be calcuated with height and itemSize
@@ -310,6 +310,7 @@ export const ScrollerGrid = <T extends object>(props: ScrollerGridProps<T>) => {
310
310
  hasNextPage: true,
311
311
  isNextPageLoading: false,
312
312
  lastLoadedItems: undefined,
313
+ lastItem: undefined,
313
314
  ...rest
314
315
  };
315
316
  Object.assign(refs.current, resetState);
@@ -243,10 +243,11 @@ export const ScrollerList = <T extends object>(props: ScrollerListProps<T>) => {
243
243
  const { queryPaging, ...rest } = add ?? {};
244
244
  const resetState: GridLoaderPartialStates<T> = {
245
245
  autoLoad: true,
246
- lastLoadedItems: undefined,
247
246
  loadedItems: 0,
248
247
  hasNextPage: true,
249
248
  isNextPageLoading: false,
249
+ lastLoadedItems: undefined,
250
+ lastItem: undefined,
250
251
  ...rest
251
252
  };
252
253
  Object.assign(stateRefs.current, resetState);