From 447b4cdb987bf0246351886d59b369ed90844843 Mon Sep 17 00:00:00 2001
From: shamoon <4887959+shamoon@users.noreply.github.com>
Date: Thu, 21 Nov 2024 18:50:52 -0800
Subject: [PATCH] Refactor: fix unnecessary use of filterable dropdown sorting
(#8328)
---
.../filterable-dropdown.component.html | 6 +++---
.../filterable-dropdown.component.spec.ts | 2 +-
.../filterable-dropdown.component.ts | 16 ++++++++++++----
3 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html
index 2ef970801..a3b49cf62 100644
--- a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html
+++ b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html
@@ -35,7 +35,7 @@
@if (selectionModel.items) {
- @for (item of selectionModel.itemsSorted | filter: filterText:'name'; track item; let i = $index) {
+ @for (item of selectionModel.items | filter: filterText:'name'; track item; let i = $index) {
@if (allowSelectNone || item.id) {
@@ -45,13 +45,13 @@
}
@if (editing) {
- @if ((selectionModel.itemsSorted | filter: filterText:'name').length === 0 && createRef !== undefined) {
+ @if ((selectionModel.items | filter: filterText:'name').length === 0 && createRef !== undefined) {
}
- @if ((selectionModel.itemsSorted | filter: filterText:'name').length > 0) {
+ @if ((selectionModel.items | filter: filterText:'name').length > 0) {