Merge remote-tracking branch 'origin/feature/SUPPORT-9116_clear_tree' into develop
This commit is contained in:
commit
71aa1a8bda
3 changed files with 15 additions and 1 deletions
|
|
@ -300,6 +300,10 @@
|
|||
.webbpm.account-applications dropdown-tree-view .bi-caret-right-fill::before {
|
||||
content: "\f4fd";
|
||||
}
|
||||
.webbpm.account-applications dropdown-tree-view :focus {
|
||||
outline: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
/* DropDownTree end */
|
||||
|
||||
.webbpm.account-applications .selectize-dropdown,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
[hidden]="!label" class="control-label">
|
||||
<span>{{label}}<span *ngIf="isRequired()" class="alarm"> *</span></span>
|
||||
</label>
|
||||
<div>
|
||||
<div tabindex="0" (keydown)="onKeyDown($event)">
|
||||
<ngx-dropdown-treeview-select
|
||||
[items]="items"
|
||||
[maxHeight]="maxHeight"
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import {
|
|||
import {
|
||||
AdvancedProperty,
|
||||
Event,
|
||||
EventUtils,
|
||||
InputControl,
|
||||
LocalStorageService,
|
||||
NotNull,
|
||||
|
|
@ -269,6 +270,15 @@ export class DropdownTreeViewComponent extends InputControl {
|
|||
return null;
|
||||
}
|
||||
|
||||
onKeyDown(event: KeyboardEvent): void {
|
||||
const isInput = (event.target as HTMLElement).tagName === 'INPUT';
|
||||
if (EventUtils.isKeyBackspace(event) && !isInput && this.value) {
|
||||
this.clearValue();
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
onChange() {
|
||||
super.onChange();
|
||||
this.valueChangeEvent.trigger(this.value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue