Skip to content

Commit

Permalink
Fix not clear with delete key when [allowClear]="false". Closes #191
Browse files Browse the repository at this point in the history
  • Loading branch information
amiram committed Nov 30, 2020
1 parent 2bf93ab commit ed053d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/lib/ngx-select/ngx-select.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,9 @@ export class NgxSelectComponent implements INgxSelectOptions, ControlValueAccess
this.optionsOpen();
break;
case this.keyCodeToRemoveSelected:
this.optionRemove(this.subjOptionsSelected.value[this.subjOptionsSelected.value.length - 1], event);
if (this.multiple || this.canClearNotMultiple()) {
this.optionRemove(this.subjOptionsSelected.value[this.subjOptionsSelected.value.length - 1], event);
}
break;
}
}
Expand Down

0 comments on commit ed053d5

Please sign in to comment.