@fto-consult/expo-ui 2.26.8 → 2.26.9
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
|
@@ -129,7 +129,7 @@ const SWRDatagridComponent = React.forwardRef((props,ref)=>{
|
|
|
129
129
|
fetchPath = defaultStr(fetchPath,table.queryPath,tableName.toLowerCase()).trim();
|
|
130
130
|
const innerRef = React.useRef(null);
|
|
131
131
|
const showProgressRef = React.useRef(true);
|
|
132
|
-
const dataRef = React.useRef(
|
|
132
|
+
const dataRef = React.useRef([]);
|
|
133
133
|
const hasResultRef = React.useRef(false);
|
|
134
134
|
const totalRef = React.useRef(0);
|
|
135
135
|
const isFetchingRef = React.useRef(false);
|
|
@@ -160,13 +160,6 @@ const SWRDatagridComponent = React.forwardRef((props,ref)=>{
|
|
|
160
160
|
}
|
|
161
161
|
const fetchCB = ({data,total})=>{
|
|
162
162
|
totalRef.current = total;
|
|
163
|
-
/***
|
|
164
|
-
* if(pageRef.current ===firstPage){
|
|
165
|
-
dataRef.current = data;
|
|
166
|
-
} else {
|
|
167
|
-
dataRef.current = prevPage != pageRef.current ? (isObj(data)?{...dataRef.current,...data}:[...dataRef.current,...data]) : data;
|
|
168
|
-
}
|
|
169
|
-
*/
|
|
170
163
|
dataRef.current = data;
|
|
171
164
|
hasResultRef.current = true;
|
|
172
165
|
if(onFetchData && typeof onFetchData =='function'){
|
|
@@ -205,7 +198,7 @@ const SWRDatagridComponent = React.forwardRef((props,ref)=>{
|
|
|
205
198
|
},[isValidating,isLoading])
|
|
206
199
|
const doRefresh = (showProgress)=>{
|
|
207
200
|
showProgressRef.current = showProgress ? typeof showProgress ==='boolean' : false;
|
|
208
|
-
|
|
201
|
+
if(isFetchingRef.current) return;
|
|
209
202
|
refreshCBRef.current = ()=>{
|
|
210
203
|
//showProgressRef.current = false;
|
|
211
204
|
};
|