@fto-consult/expo-ui 6.76.5 → 6.77.0
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
@@ -514,7 +514,7 @@ const DatagridFactory = (Factory)=>{
|
|
514
514
|
<View testID={testID+"_AccordionHeader"} style={[styles.accordionHeader]} ref={(el)=>{
|
515
515
|
this.layoutRef.current = el;
|
516
516
|
}} onLayout={this.updateLayout.bind(this)}>
|
517
|
-
{this.
|
517
|
+
{this.canRenderActions() ? <DatagridActions
|
518
518
|
testID={testID+"_Actions"}
|
519
519
|
pointerEvents = {pointerEvents}
|
520
520
|
title = {this.renderDataSourceSelector()}
|
@@ -3781,6 +3781,9 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
3781
3781
|
key = {props.rowKey}
|
3782
3782
|
/>
|
3783
3783
|
}
|
3784
|
+
canRenderActions(){
|
3785
|
+
return this.props.showActions !== false && this.props.renderActions !== false;
|
3786
|
+
}
|
3784
3787
|
renderSelectFieldCell(args){
|
3785
3788
|
return this.renderSelectFieldCell(args);
|
3786
3789
|
}
|
@@ -3918,6 +3921,11 @@ CommonDatagridComponent.propTypes = {
|
|
3918
3921
|
PropTypes.bool,
|
3919
3922
|
PropTypes.object,
|
3920
3923
|
]),
|
3924
|
+
/*** alias à show actions */
|
3925
|
+
renderActions : PropTypes.oneOfType([
|
3926
|
+
PropTypes.bool,
|
3927
|
+
PropTypes.func,
|
3928
|
+
]),
|
3921
3929
|
showActions : PropTypes.bool,//si on affichera les actions du datagrid
|
3922
3930
|
/*** affiche ou masque les filtres */
|
3923
3931
|
showFilters : PropTypes.bool,
|
@@ -398,7 +398,6 @@ const SWRDatagridComponent = React.forwardRef((props,ref)=>{
|
|
398
398
|
autoSort = {canSortRemotely()? false : true}
|
399
399
|
isLoading = {loading && showProgressRef.current || false}
|
400
400
|
beforeFetchData = {(args)=>{
|
401
|
-
if(typeof beforeFetchData =="function" && beforeFetchData(args)==false) return;
|
402
401
|
let {fetchOptions:opts,force,renderProgressBar} = args;
|
403
402
|
opts = getFetchOptions({showError:showProgressRef.current,...opts});
|
404
403
|
isInitializedRef.current = true;
|
@@ -408,7 +407,7 @@ const SWRDatagridComponent = React.forwardRef((props,ref)=>{
|
|
408
407
|
if(force){
|
409
408
|
pageRef.current = firstPage;
|
410
409
|
}
|
411
|
-
|
410
|
+
if(typeof beforeFetchData =="function" && beforeFetchData(args)==false) return;
|
412
411
|
doRefresh(typeof renderProgressBar =='boolean'? renderProgressBar : force);
|
413
412
|
return false;
|
414
413
|
}}
|
@@ -291,7 +291,7 @@ const DatagridFactory = (Factory)=>{
|
|
291
291
|
return <DatagridProvider context={this}>
|
292
292
|
<View style={[styles.container,{flex:1}]} testID={testID+"_TableContainer"} pointerEvents={pointerEvents}>
|
293
293
|
<View ref={(el)=>{this.layoutRef.current = el;}} testID={testID+"_LayoutContainer"}>
|
294
|
-
{this.
|
294
|
+
{this.canRenderActions() ? <DatagridActions
|
295
295
|
pointerEvents = {pointerEvents}
|
296
296
|
title = {this.renderDataSourceSelector()}
|
297
297
|
actions = {actions}
|
@@ -257,7 +257,6 @@ export default class FormDataComponent extends AppComponent{
|
|
257
257
|
ignoreFields, //la liste des champs à ignorer lors du parcours des champs
|
258
258
|
toolbarProps,
|
259
259
|
text,
|
260
|
-
showActionsOnTop,
|
261
260
|
getFieldProps, ///pour ajouter des champs supplémentaires aux props de la field
|
262
261
|
title,
|
263
262
|
onMount,
|