Merge branch 'feature/SUPPORT-9304' into develop

This commit is contained in:
adel.ka 2025-08-04 09:27:20 +03:00
commit 6d570da8a7
2 changed files with 11 additions and 3 deletions

View file

@ -61,6 +61,8 @@ export class DropdownTreeViewComponent extends InputControl {
public valueChangeEvent: Event<TreeItemDto> = new Event<TreeItemDto>();
@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();