Skip to content

Commit 8f1627a

Browse files
fix(platform): vhd should reset search after closing dialog (#12407)
1 parent 2358bd8 commit 8f1627a

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

libs/platform/value-help-dialog/value-help-dialog/value-help-dialog.component.spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,13 @@ describe('PlatformValueHelpDialogComponent', () => {
135135
testComponent.vhdComponent.onSelect(testComponent.data.slice(0, 3));
136136
expect(testComponent.vhdComponent.valueChange.emit).toHaveBeenCalled();
137137
});
138+
139+
it('should handle dialog close', async () => {
140+
testComponent.vhdComponent.open();
141+
testComponent.vhdComponent._mainSearch = 'test';
142+
if (testComponent.vhdComponent.activeDialog) {
143+
testComponent.vhdComponent.activeDialog.close();
144+
}
145+
expect(testComponent.vhdComponent._mainSearch).toBe('');
146+
});
138147
});

libs/platform/value-help-dialog/value-help-dialog/value-help-dialog.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,7 @@ export class PlatformValueHelpDialogComponent<T = any> extends VhdComponent impl
737737
/** @hidden */
738738
private _resetState(): void {
739739
this._resetSourceStream();
740+
this._mainSearch = '';
740741
this.activeDialog = undefined;
741742
}
742743

0 commit comments

Comments
 (0)