From cfe02dc839be2f6d1fb2456aaccecbbed3583231 Mon Sep 17 00:00:00 2001 From: Cihan Polat Date: Sat, 18 May 2024 10:02:04 +0200 Subject: [PATCH] fix(chips): trigger itemClick event with 'Space' key --- src/app/components/chips/chips.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/app/components/chips/chips.ts b/src/app/components/chips/chips.ts index d10f3172931..f009753c077 100755 --- a/src/app/components/chips/chips.ts +++ b/src/app/components/chips/chips.ts @@ -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; }