mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Merge pull request #1375 from Alfresco/dev-valbano-1303
#1303 - fix typeahead show for completed tasks
This commit is contained in:
@@ -179,6 +179,7 @@ export class DisplayValueWidget extends WidgetComponent implements OnInit {
|
|||||||
} else {
|
} else {
|
||||||
this.value = this.field.value;
|
this.value = this.field.value;
|
||||||
}
|
}
|
||||||
|
this.visibilityService.refreshVisibility(this.field.form);
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
@@ -191,20 +192,21 @@ export class DisplayValueWidget extends WidgetComponent implements OnInit {
|
|||||||
this.formService
|
this.formService
|
||||||
.getRestFieldValues(this.field.form.taskId, this.field.id)
|
.getRestFieldValues(this.field.form.taskId, this.field.id)
|
||||||
.subscribe(
|
.subscribe(
|
||||||
(result: FormFieldOption[]) => {
|
(result: FormFieldOption[]) => {
|
||||||
let options = result || [];
|
let options = result || [];
|
||||||
let toSelect = options.find(item => item.id === this.field.value);
|
let toSelect = options.find(item => item.id === this.field.value);
|
||||||
this.field.options = options;
|
this.field.options = options;
|
||||||
if (toSelect) {
|
if (toSelect) {
|
||||||
this.value = toSelect.name;
|
this.value = toSelect.name;
|
||||||
} else {
|
} else {
|
||||||
this.value = this.field.value;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error => {
|
|
||||||
console.log(error);
|
|
||||||
this.value = this.field.value;
|
this.value = this.field.value;
|
||||||
}
|
}
|
||||||
|
this.visibilityService.refreshVisibility(this.field.form);
|
||||||
|
},
|
||||||
|
error => {
|
||||||
|
console.log(error);
|
||||||
|
this.value = this.field.value;
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user