@fto-consult/expo-ui 6.90.0 → 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
@@ -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,13 +325,15 @@ export default class TableDataScreenComponent extends FormDataScreen{
|
|
324
325
|
isUpdated,
|
325
326
|
fields,
|
326
327
|
});
|
327
|
-
const
|
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 :
|
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,
|
@@ -651,11 +654,7 @@ export default class TableDataScreenComponent extends FormDataScreen{
|
|
651
654
|
return this.doSave(args);
|
652
655
|
}
|
653
656
|
canCreateNew(){
|
654
|
-
|
655
|
-
if("newAction" in editingProps){
|
656
|
-
return !!editingProps.newAction;
|
657
|
-
}
|
658
|
-
return this.props.newAction !== false ? true : false;
|
657
|
+
return this.props.newAction !== false;
|
659
658
|
}
|
660
659
|
isMobileOrTabletMedia(){
|
661
660
|
const r = this.getRenderTabsType();
|