Advanced Search: Don't clear value on field changed if the field type is keyword
This commit is contained in:
parent
73d6a9f32f
commit
8c2cb847e9
|
@ -188,8 +188,10 @@ export class AdvancedSearchFormComponent implements OnInit, OnDestroy, OnChanges
|
||||||
|
|
||||||
fieldIdsChanged(index: number, fieldId: string) {
|
fieldIdsChanged(index: number, fieldId: string) {
|
||||||
this.selectedFields[index].name = this.fieldIdsMap[fieldId].name;
|
this.selectedFields[index].name = this.fieldIdsMap[fieldId].name;
|
||||||
this.selectedFields[index].type = this.fieldIdsMap[fieldId].type;
|
if(this.selectedFields[index].type !== 'keyword' || this.fieldIdsMap[fieldId].type !== 'keyword') {
|
||||||
this.selectedFields[index].value = "";
|
this.selectedFields[index].value = "";
|
||||||
|
}
|
||||||
|
this.selectedFields[index].type = this.fieldIdsMap[fieldId].type;
|
||||||
this.selectedFields[index].param = this.fieldIdsMap[fieldId].param;
|
this.selectedFields[index].param = this.fieldIdsMap[fieldId].param;
|
||||||
if (this.fieldIdsMap[fieldId].type == "boolean") {
|
if (this.fieldIdsMap[fieldId].type == "boolean") {
|
||||||
this.selectedFields[index].value = "true";
|
this.selectedFields[index].value = "true";
|
||||||
|
|
Loading…
Reference in New Issue