@fto-consult/expo-ui 2.13.0 → 2.13.2
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
package/src/App.js
CHANGED
|
@@ -92,7 +92,7 @@ export default class CommonTableDatagrid extends CommonDatagrid{
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
this.beforeFetchData(fetchOptions);
|
|
95
|
-
if(typeof this.props.beforeFetchData =='function' && this.props.beforeFetchData({context:this,fetchOptions,options:fetchOptions}) === false){
|
|
95
|
+
if(typeof this.props.beforeFetchData =='function' && this.props.beforeFetchData({context:this,force,fetchOptions,options:fetchOptions}) === false){
|
|
96
96
|
this.isFetchingData = false;
|
|
97
97
|
return resolve(this.state.data);
|
|
98
98
|
}
|
|
@@ -139,10 +139,10 @@ const SWRDatagridComponent = React.forwardRef((props,ref)=>{
|
|
|
139
139
|
}
|
|
140
140
|
},[isValidating,isLoading])
|
|
141
141
|
const doRefresh = (showProgress)=>{
|
|
142
|
+
showProgressRef.current = showProgress ? typeof showProgress ==='boolean' : false;
|
|
142
143
|
if(isFetchingRef.current) return;
|
|
143
|
-
showProgressRef.current = showProgress ? typeof showProgress ==='boolean' : true;
|
|
144
144
|
refreshCBRef.current = ()=>{
|
|
145
|
-
showProgressRef.current =
|
|
145
|
+
//showProgressRef.current = false;
|
|
146
146
|
};
|
|
147
147
|
refresh();
|
|
148
148
|
}
|
|
@@ -163,12 +163,12 @@ const SWRDatagridComponent = React.forwardRef((props,ref)=>{
|
|
|
163
163
|
<Datagrid
|
|
164
164
|
{...rest}
|
|
165
165
|
{...defaultObj(table.datagrid)}
|
|
166
|
-
isLoading = {isLoading|| isValidating && !error && showProgressRef.current && true || false}
|
|
167
|
-
beforeFetchData = {({fetchOptions:opts})=>{
|
|
166
|
+
isLoading = {(isLoading|| isValidating) && !error && showProgressRef.current && true || false}
|
|
167
|
+
beforeFetchData = {({fetchOptions:opts,force})=>{
|
|
168
168
|
opts.fields = fetchFields;
|
|
169
169
|
opts = getFetchOptions({showError:showProgressRef.current,...opts});
|
|
170
170
|
fetchOptionsRef.current = opts;
|
|
171
|
-
doRefresh(
|
|
171
|
+
doRefresh(force);
|
|
172
172
|
return false;
|
|
173
173
|
}}
|
|
174
174
|
isTableData
|