diff --git a/web-app/src/app/routes/monitor/monitor-list/monitor-list.component.html b/web-app/src/app/routes/monitor/monitor-list/monitor-list.component.html
index 172ead21410..449a059d37c 100755
--- a/web-app/src/app/routes/monitor/monitor-list/monitor-list.component.html
+++ b/web-app/src/app/routes/monitor/monitor-list/monitor-list.component.html
@@ -107,7 +107,7 @@
class="mobile-hide"
[placeholder]="'monitors.search.tag' | i18n"
[(value)]="tag"
- (valueChange)="onFilterSearchMonitors()"
+ (valueChange)="onTagChanged()"
/>
@@ -57,8 +57,8 @@
[nzType]="passwordVisible ? 'eye-invisible' : 'eye'"
(click)="passwordVisible = !passwordVisible"
>
- } @if (allowClear && inputValue) {
-
+ } @if (allowClear && value) {
+
}
diff --git a/web-app/src/app/shared/components/multi-func-input/multi-func-input.component.ts b/web-app/src/app/shared/components/multi-func-input/multi-func-input.component.ts
index b987b0c9778..8806e08a859 100755
--- a/web-app/src/app/shared/components/multi-func-input/multi-func-input.component.ts
+++ b/web-app/src/app/shared/components/multi-func-input/multi-func-input.component.ts
@@ -17,7 +17,7 @@
* under the License.
*/
-import { Component, OnInit, EventEmitter, Input, Output, ContentChild, TemplateRef, forwardRef } from '@angular/core';
+import { Component, EventEmitter, Input, Output, ContentChild, TemplateRef, forwardRef } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import { NzSizeLDSType } from 'ng-zorro-antd/core/types';
@@ -33,7 +33,7 @@ import { NzSizeLDSType } from 'ng-zorro-antd/core/types';
}
]
})
-export class MultiFuncInputComponent implements OnInit, ControlValueAccessor {
+export class MultiFuncInputComponent implements ControlValueAccessor {
constructor() {}
@ContentChild('prefix', { static: true }) prefix: TemplateRef | undefined;
@@ -53,27 +53,18 @@ export class MultiFuncInputComponent implements OnInit, ControlValueAccessor {
@Output() readonly valueChange = new EventEmitter();
disabled: boolean = false;
- inputValue: any | undefined;
passwordVisible: boolean = false;
_onChange = (_: any) => {};
_onTouched = () => {};
- ngOnInit(): void {
- this.inputValue = this.value;
+ onChange(inputValue: any) {
+ this.valueChange.emit(inputValue);
+ this._onChange(inputValue);
}
- onChange() {
- if (this.inputValue !== this.value) {
- this.valueChange.emit(this.inputValue);
- this._onChange(this.inputValue);
- }
- }
-
- writeValue(obj: any): void {
- if (obj !== this.inputValue) {
- this.inputValue = obj;
- }
+ writeValue(value: any): void {
+ this.value = value;
}
registerOnChange(fn: any): void {