@fto-consult/expo-ui 6.89.2 → 6.90.1

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": "6.89.2",
3
+ "version": "6.90.1",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "main",
6
6
  "scripts": {
@@ -246,6 +246,7 @@ export default class TableDataScreenComponent extends FormDataScreen{
246
246
  clone,
247
247
  isArchivable,clonable,isPrintable,print,data:customData,getRowKey,
248
248
  save2newAction,
249
+ newAction,
249
250
  save2cloneAction,
250
251
  saveAction,
251
252
  save2closeAction,
@@ -324,17 +325,19 @@ export default class TableDataScreenComponent extends FormDataScreen{
324
325
  isUpdated,
325
326
  fields,
326
327
  });
327
- const cCloneAction = this.isClonable() && this.canCreateNew() && clonable !== false && cloneAction !== false && true || false;
328
+ const canNew = this.canCreateNew() && newAction !== false;
329
+ const cCloneAction = this.isClonable() && canNew && clonable !== false && cloneAction !== false && true || false;
328
330
  const rActionsArg = this.currentRenderingProps = {
329
331
  ...rest,
330
332
  ...formProps,
331
333
  context,
334
+ newAction,
332
335
  cloneAction : cCloneAction,
333
- save2newAction : this.canCreateNew() && save2newAction !== false ? true : false,
336
+ save2newAction : canNew ? typeof save2newAction =="boolean"? save2newAction : saveAction !== false : false,
334
337
  save2cloneAction : cCloneAction && save2cloneAction !== false ? true : false,
335
338
  isMobile : isMobOrTab,
336
339
  saveAction,
337
- save2closeAction,
340
+ save2closeAction : typeof save2cloneAction ==="boolean"? save2cloneAction : saveAction !== false,
338
341
  tableName,
339
342
  sessionName,
340
343
  table,
@@ -396,9 +399,12 @@ export default class TableDataScreenComponent extends FormDataScreen{
396
399
  handleCustomRender(){
397
400
  return true;
398
401
  }
402
+ canRenderActions(){
403
+ return (this.props.renderActions !== false);
404
+ }
399
405
  componentWillRender({...rActionsArg}){
400
406
  rActionsArg.context = this;
401
- const rActions = renderActions.call(this,rActionsArg);
407
+ const rActions = this.canRenderActions()? renderActions.call(this,rActionsArg) : {};
402
408
  const renderedActs = this.renderActions(rActionsArg);
403
409
  if(!rActionsArg.archived){
404
410
  const customActionKeyPrefix = this.getRenderedActionPrefix();
@@ -648,11 +654,7 @@ export default class TableDataScreenComponent extends FormDataScreen{
648
654
  return this.doSave(args);
649
655
  }
650
656
  canCreateNew(){
651
- const editingProps = this.getCurrentRenderingProps();
652
- if("newAction" in editingProps){
653
- return !!editingProps.newAction;
654
- }
655
- return this.props.newAction !== false ? true : false;
657
+ return this.props.newAction !== false;
656
658
  }
657
659
  isMobileOrTabletMedia(){
658
660
  const r = this.getRenderTabsType();