@fto-consult/expo-ui 2.23.6 → 2.23.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.
package/package.json
CHANGED
|
@@ -83,8 +83,10 @@ const SWRDatagridComponent = React.forwardRef((props,ref)=>{
|
|
|
83
83
|
ListFooterComponent,
|
|
84
84
|
testID,
|
|
85
85
|
autoSort,
|
|
86
|
+
fetchOptions:customFetchOptions,
|
|
86
87
|
handleQueryLimit,
|
|
87
88
|
onFetchData,
|
|
89
|
+
beforeFetchData,
|
|
88
90
|
...rest
|
|
89
91
|
} = props;
|
|
90
92
|
rest = defaultObj(rest);
|
|
@@ -122,7 +124,7 @@ const SWRDatagridComponent = React.forwardRef((props,ref)=>{
|
|
|
122
124
|
fileName : rest.exportTableProps.fileName,
|
|
123
125
|
title
|
|
124
126
|
},rest.exportTableProps.pdf);
|
|
125
|
-
const fetchOptionsRef = React.useRef(
|
|
127
|
+
const fetchOptionsRef = React.useRef(defaultObj(customFetchOptions));
|
|
126
128
|
const refreshCBRef = React.useRef(null);
|
|
127
129
|
fetchPath = defaultStr(fetchPath,table.queryPath,tableName.toLowerCase()).trim();
|
|
128
130
|
const innerRef = React.useRef(null);
|
|
@@ -390,7 +392,9 @@ const SWRDatagridComponent = React.forwardRef((props,ref)=>{
|
|
|
390
392
|
handlePagination = {false}
|
|
391
393
|
autoSort = {canSortRemotely()? false : true}
|
|
392
394
|
isLoading = {loading && !error && showProgressRef.current && true || false}
|
|
393
|
-
beforeFetchData = {(
|
|
395
|
+
beforeFetchData = {(args)=>{
|
|
396
|
+
let {fetchOptions:opts,force} = args;
|
|
397
|
+
if(typeof beforeFetchData =="function" && beforeFetchData(fetchData)==false) return;
|
|
394
398
|
opts.fields = fetchFields;
|
|
395
399
|
opts = getFetchOptions({showError:showProgressRef.current,...opts});
|
|
396
400
|
isInitializedRef.current = true;
|
|
@@ -349,8 +349,12 @@ export default class TableDataScreenComponent extends FormDataScreen{
|
|
|
349
349
|
rActionsArg.formProps = formProps;
|
|
350
350
|
return rActionsArg;
|
|
351
351
|
}
|
|
352
|
-
renderTabs(){
|
|
353
|
-
|
|
352
|
+
renderTabs(args){
|
|
353
|
+
const tabs = this.getMainProps().tabs;
|
|
354
|
+
if(typeof tabs =='function'){
|
|
355
|
+
return tabs(args);
|
|
356
|
+
}
|
|
357
|
+
return tabs;
|
|
354
358
|
}
|
|
355
359
|
handleCustomRender(){
|
|
356
360
|
return true;
|