@fto-consult/expo-ui 7.6.32 → 7.6.34

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "7.6.32",
3
+ "version": "7.6.34",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "scripts": {
6
6
  "clear-npx-cache": "npx clear-npx-cache",
@@ -72,7 +72,7 @@
72
72
  "@expo/vector-icons": "^13.0.0",
73
73
  "@faker-js/faker": "^8.0.2",
74
74
  "@fto-consult/common": "^3.73.29",
75
- "@fto-consult/electron": "^1.0.27",
75
+ "@fto-consult/electron": "^1.0.29",
76
76
  "@pchmn/expo-material3-theme": "^1.3.1",
77
77
  "@react-native-async-storage/async-storage": "1.18.2",
78
78
  "@react-native-community/datetimepicker": "7.2.0",
@@ -161,6 +161,7 @@ const SWRDatagridComponent = React.forwardRef((props,ref)=>{
161
161
  const sortRef = React.useRef({});
162
162
  const innerRef = React.useRef(null);
163
163
  const showProgressRef = React.useRef(true);
164
+ const forceRefreshRef = React.useRef(true);
164
165
  const pageRef = React.useRef(1);
165
166
  const canHandlePagination = handlePagination !== false ? true : false;
166
167
  const canHandleLimit = handleQueryLimit !== false && canHandlePagination ? true : false;
@@ -238,7 +239,8 @@ const SWRDatagridComponent = React.forwardRef((props,ref)=>{
238
239
  showProgressRef.current = showProgress || typeof showProgress ==='boolean' ? showProgress : false;
239
240
  const fPath = isNonNullString(fetchPath)? fetchPath : fPathRef.current;
240
241
  const rKey = `${setQueryParams(fPath,"swrRefreshKeyId",uniqid("swr-refresh-key"))}`;
241
- refresh(rKey,data);
242
+ forceRefreshRef.current = true;
243
+ refresh(rKey);
242
244
  }
243
245
  const canPaginate = ()=>{
244
246
  if(!canHandlePagination) return false;
@@ -302,6 +304,8 @@ const SWRDatagridComponent = React.forwardRef((props,ref)=>{
302
304
  showProgressRef.current = false;
303
305
  }
304
306
  },[showProgressRef.current]);
307
+ const isAppLoading = loading && showProgressRef.current && forceRefreshRef.current || false;
308
+ forceRefreshRef.current = undefined;
305
309
  return (
306
310
  <Datagrid
307
311
  testID = {testID}
@@ -408,7 +412,7 @@ const SWRDatagridComponent = React.forwardRef((props,ref)=>{
408
412
  handleQueryLimit = {false}
409
413
  handlePagination = {false}
410
414
  autoSort = {canSortRemotely()? false : true}
411
- isLoading = {loading && showProgressRef.current || false}
415
+ isLoading = {isAppLoading}
412
416
  beforeFetchData = {(args)=>{
413
417
  let {fetchOptions:opts,force,renderProgressBar} = args;
414
418
  opts = getFetchOptions({showError:showProgressRef.current,...opts});
@@ -91,6 +91,9 @@ export default class Filter extends AppComponent {
91
91
  this.manualRunRef.current = value;
92
92
  }
93
93
  getSessionManualRunValue(){
94
+ if(this.manualRunRef.current === undefined && this.isFilterSelect()){
95
+ this.manualRunRef.current = true;
96
+ }
94
97
  return this.manualRunRef.current;
95
98
  return getSessionData(manualRunKey) ? true : false
96
99
  }