From 53fb753e0f1c67f10ec7fa87a5098d3202f224ef Mon Sep 17 00:00:00 2001 From: "adel.ka" Date: Fri, 1 Aug 2025 14:33:05 +0300 Subject: [PATCH] =?UTF-8?q?SUPPORT-9304:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D0=BB=20=D0=BE=D0=BF=D1=86=D0=B8=D1=8E=20=D0=BD=D0=B0=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=BF=D1=80=D0=B5=D1=82=20=D0=BE=D1=87=D0=B8=D1=81?= =?UTF-8?q?=D1=82=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/field/DropdownTreeViewComponent.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/ts/account_applications/component/field/DropdownTreeViewComponent.ts b/frontend/src/ts/account_applications/component/field/DropdownTreeViewComponent.ts index edaac060..6ab23fee 100644 --- a/frontend/src/ts/account_applications/component/field/DropdownTreeViewComponent.ts +++ b/frontend/src/ts/account_applications/component/field/DropdownTreeViewComponent.ts @@ -61,6 +61,8 @@ export class DropdownTreeViewComponent extends InputControl { public valueChangeEvent: Event = new Event(); @AdvancedProperty() public skipInitialSelection: boolean; + @AdvancedProperty() + public allowClear: boolean = true; @NotNull() public preferBusinessId: boolean = false; private rpcService: TreeItemRpcService; @@ -272,7 +274,7 @@ export class DropdownTreeViewComponent extends InputControl { onKeyDown(event: KeyboardEvent): void { const isInput = (event.target as HTMLElement).tagName === 'INPUT'; - if (EventUtils.isKeyBackspace(event) && !isInput && this.value) { + if (EventUtils.isKeyBackspace(event) && !isInput && this.value && this.allowClear) { this.clearValue(); event.stopPropagation(); event.preventDefault();