@fto-consult/expo-ui 2.48.5 → 2.48.6
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 +1 -1
- package/src/components/Avatar/Text.js +2 -2
- package/src/components/Countries/resources/countries-normalized.json +1987 -1987
- package/src/components/Countries/resources/countries-with-not-extra.json +1211 -1211
- package/src/components/Countries/resources/countries.sql +243 -243
- package/src/components/Datagrid/Common/Common.js +3 -0
- package/src/components/Form/Fields/SelectTableData/Component.js +21 -4
- package/src/components/Form/FormData/FormData.js +2 -2
- package/src/components/Form/FormData/FormDataActions.js +21 -6
- package/src/layouts/Screen/TableData.js +5 -2
|
@@ -142,7 +142,6 @@ export default class TableDataScreenComponent extends FormDataScreen{
|
|
|
142
142
|
archiveProp : {value : typeof mainProps.archive =='function' && mainProps.archive || undefined },
|
|
143
143
|
testIDProp : {value : defaultStr(mainProps.testID)},
|
|
144
144
|
showPreloaderOnUpsert : {value : mainProps.showPreloaderOnUpsert},
|
|
145
|
-
isDocEditingProp : {value : typeof mainProps.isDocEditing =='function'? mainProps.isDocEditing : typeof mainProps.isDocUpdate =='function'? mainProps.isDocUpdate : undefined}
|
|
146
145
|
});
|
|
147
146
|
this.hidePreloader = this.hidePreloader.bind(this);
|
|
148
147
|
this.showPreloader = this.showPreloader.bind(this);
|
|
@@ -281,6 +280,7 @@ export default class TableDataScreenComponent extends FormDataScreen{
|
|
|
281
280
|
if(isObj(customFields)){
|
|
282
281
|
extendObj(true,fields,customFields);
|
|
283
282
|
}
|
|
283
|
+
console.log(this.primaryKeyFields," is pkeyFields heeeee");
|
|
284
284
|
///on effectue une mutator sur le champ en cours de modification
|
|
285
285
|
if(typeof prepareField =='function'){
|
|
286
286
|
Object.map(fields,(field,i,counterIndex)=>{
|
|
@@ -525,10 +525,13 @@ export default class TableDataScreenComponent extends FormDataScreen{
|
|
|
525
525
|
}
|
|
526
526
|
isDocEditing(data){
|
|
527
527
|
data = defaultObj(data);
|
|
528
|
-
|
|
528
|
+
const isDocEditingCb = typeof this.props.isDocEditing =='function'? this.props.isDocEditing : typeof this.props.isDocUpdate =='function'? this.props.isDocUpdate : undefined;
|
|
529
|
+
if(!isDocEditingCb){
|
|
529
530
|
if(isDocEditing(data,this.primaryKeyFields,({index:field,data})=>{
|
|
530
531
|
return checkPrimary(data,field);
|
|
531
532
|
})) return true;
|
|
533
|
+
} else {
|
|
534
|
+
return isDocEditingCb(data,{context:this});
|
|
532
535
|
}
|
|
533
536
|
return super.isDocEditing(data);
|
|
534
537
|
}
|