From e20b13d6781bf4d3f43093e1c13523da7643b780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Boros=20M=C3=A1t=C3=A9?= <33902750+qwadrox@users.noreply.github.com> Date: Wed, 25 Dec 2024 16:51:45 +0100 Subject: [PATCH] #17130 attempt to fix backward search (#17168) --- packages/primeng/src/select/select.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/packages/primeng/src/select/select.ts b/packages/primeng/src/select/select.ts index 5e2be10c7d..451dd641e4 100755 --- a/packages/primeng/src/select/select.ts +++ b/packages/primeng/src/select/select.ts @@ -2006,19 +2006,7 @@ export class Select extends BaseComponent implements OnInit, AfterViewInit, Afte let optionIndex = -1; let matched = false; - if (this.focusedOptionIndex() !== -1) { - optionIndex = this.visibleOptions() - .slice(this.focusedOptionIndex()) - .findIndex((option) => this.isOptionMatched(option)); - optionIndex = - optionIndex === -1 - ? this.visibleOptions() - .slice(0, this.focusedOptionIndex()) - .findIndex((option) => this.isOptionMatched(option)) - : optionIndex + this.focusedOptionIndex(); - } else { - optionIndex = this.visibleOptions().findIndex((option) => this.isOptionMatched(option)); - } + optionIndex = this.visibleOptions().findIndex((option) => this.isOptionMatched(option)); if (optionIndex !== -1) { matched = true;