From 9af7bb3beaab2f446b4bf40269320bf49e961c54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Boros=20Ma=CC=81te=CC=81?= <33902750+qwadrox@users.noreply.github.com> Date: Sat, 21 Dec 2024 13:59:55 +0100 Subject: [PATCH] #17130 attempt to fix backward search --- 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 b84f0ed5a9f..6c4b6652202 100755 --- a/packages/primeng/src/select/select.ts +++ b/packages/primeng/src/select/select.ts @@ -2000,19 +2000,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;