Commit de5b23af authored by Alessandro Curci's avatar Alessandro Curci
Browse files

bug fixed: memberships label is now changed only when post.role effectivelly changes

parent 085a9059
......@@ -132,11 +132,14 @@ export class AppConfig {
{key:'label' , type:'input' , className:'col-5', templateOptions: {label:'Descrizione' },
hooks: {
onInit: function(field) {
const { form, model, options } = field;
form.get('post_role').valueChanges.subscribe(val => {
field.formControl.setValue(val);
});
}
const { form, model, options } = field;
field.app_subscription_change = form.get('post_role').valueChanges.subscribe(val => {
field.formControl.setValue(val);
});
},
onDestroy: function(field) {
field.app_subscription_change.unsubscribe();
}
}
},
{key: 'area' , type:'select2',className:'col-5', templateOptions: {label: 'Area', codelistPath: 'areas', codeListPaged: true}},
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment