@fto-consult/expo-ui 7.16.3 → 7.16.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
CHANGED
@@ -711,6 +711,7 @@ class DropdownComponent extends AppComponent {
|
|
711
711
|
showSearch,
|
712
712
|
onAddCallback,
|
713
713
|
onAddPress,
|
714
|
+
onAddProps,
|
714
715
|
itemLabel,
|
715
716
|
checkedIcon:customCheckedIcon,
|
716
717
|
mode,
|
@@ -788,7 +789,8 @@ class DropdownComponent extends AppComponent {
|
|
788
789
|
onPress : (e)=>{
|
789
790
|
React.stopEventPropagation(e);
|
790
791
|
if(iconDisabled) return;
|
791
|
-
const
|
792
|
+
const onAddP = typeof onAddProps ==='function'? onAddProps(props) : onAddProps;
|
793
|
+
const aArgs = {...React.getOnPressArgs(e),...Object.assign({},onAddP),isMobile:isMob,context:this,visible:state.visible,field:name,props:this.props};
|
792
794
|
if(onAdd){onAdd(aArgs);}
|
793
795
|
else if(onAddPress){
|
794
796
|
onAddPress(aArgs)
|
@@ -1337,6 +1339,10 @@ DropdownComponent.propTypes = {
|
|
1337
1339
|
PropTypes.bool,
|
1338
1340
|
]),
|
1339
1341
|
onAdd : PropTypes.func,
|
1342
|
+
onAddProps : PropTypes.oneOfType([
|
1343
|
+
PropTypes.func,
|
1344
|
+
PropTypes.object,
|
1345
|
+
]),
|
1340
1346
|
getItemKey : PropTypes.func,///la fonction prenant en paramètre un item et retourne sa clé unique
|
1341
1347
|
}
|
1342
1348
|
|
@@ -284,7 +284,7 @@ export default class TableDataScreenComponent extends FormDataScreen{
|
|
284
284
|
currentField.readOnly = true;
|
285
285
|
}
|
286
286
|
});
|
287
|
-
const cArgs = {field:currentField,columnField,columnDef:currentField,isUpdate:isUpdated,name:columnField,index:i,counterIndex,isPrimary,fields:preparedFields,contex:this,data:this.getCurrentData(),datas,currentIndex,isUpdated,tableName,table};
|
287
|
+
const cArgs = {...rest,field:currentField,columnField,columnDef:currentField,isUpdate:isUpdated,name:columnField,index:i,counterIndex,isPrimary,fields:preparedFields,contex:this,data:this.getCurrentData(),datas,currentIndex,isUpdated,tableName,table};
|
288
288
|
if(isUpdated){
|
289
289
|
//la props readOnlyOnEditing permet de rendre le champ readOnly en cas de mise à jour de la tableData
|
290
290
|
const readOnlyOnEditing = typeof currentField.readOnlyOnEditing =='function'? currentField.readOnlyOnEditing(cArgs) : currentField.readOnlyOnEditing;
|
@@ -314,6 +314,10 @@ export default class TableDataScreenComponent extends FormDataScreen{
|
|
314
314
|
}
|
315
315
|
|
316
316
|
}
|
317
|
+
if(rest.archived === true){
|
318
|
+
currentField.readOnly = true;
|
319
|
+
currentField.disabled = true;
|
320
|
+
}
|
317
321
|
fields[i] = currentField;
|
318
322
|
});
|
319
323
|
const context = this;
|