Skip to content

Commit

Permalink
fix(chips): trigger itemClick event with 'Space' key
Browse files Browse the repository at this point in the history
  • Loading branch information
Cihan Polat committed May 18, 2024
1 parent b55baa8 commit cfe02dc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/components/chips/chips.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,12 @@ export class Chips implements AfterContentInit, ControlValueAccessor {
this.onBackspaceKeyOn(event);
break;

case 'Space':
if (this.focusedIndex !== null && this.value && this.value.length > 0) {
this.onItemClick(event, this.value[this.focusedIndex]);
}
break;

default:
break;
}
Expand Down

0 comments on commit cfe02dc

Please sign in to comment.