fix label select bugs (#19850)

Signed-off-by: shengqiw <shengqiw@vmware.com>
This commit is contained in:
ShengqiWang 2024-01-18 10:46:25 +08:00 committed by GitHub
parent 93d0d2982a
commit caaa641521
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -33,6 +33,8 @@ h4 {
.filterSelect clr-icon { .filterSelect clr-icon {
margin-left: 10px; margin-left: 10px;
margin-top: 5px;
margin-right: 15px;
} }
.padLeft0 { .padLeft0 {

View File

@ -367,6 +367,7 @@ export class CreateEditRuleComponent implements OnInit, OnDestroy {
this.isPushMode = true; this.isPushMode = true;
this.selectedUnit = BandwidthUnit.KB; this.selectedUnit = BandwidthUnit.KB;
this.stringForLabelFilter = ''; this.stringForLabelFilter = '';
this.copyStringForLabelFilter = '';
} }
updateRuleFormAndCopyUpdateForm(rule: ReplicationPolicy): void { updateRuleFormAndCopyUpdateForm(rule: ReplicationPolicy): void {
@ -532,7 +533,7 @@ export class CreateEditRuleComponent implements OnInit, OnDestroy {
let filters: any = copyRuleForm.filters; let filters: any = copyRuleForm.filters;
// set label filter // set label filter
if (this.stringForLabelFilter) { if (this.stringForLabelFilter || this.copyStringForLabelFilter) {
// set stringForLabelFilter // set stringForLabelFilter
copyRuleForm.filters.forEach(item => { copyRuleForm.filters.forEach(item => {
if (item.type === FilterType.LABEL) { if (item.type === FilterType.LABEL) {