From a63ab29eac8526d62307ad3afc1311cb313a26ed Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Mon, 20 Jan 2025 15:18:43 +0100 Subject: [PATCH] fix: use type to find search options instead of id --- src/modules/itemTypes.js | 1 + src/pages/edit/ItemSelector/ItemSelector.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/itemTypes.js b/src/modules/itemTypes.js index ea019ddfb..cba237478 100644 --- a/src/modules/itemTypes.js +++ b/src/modules/itemTypes.js @@ -137,6 +137,7 @@ export const itemTypeMap = { appKey: 'line-listing', }, [APP]: { + id: APP, endPointName: 'apps', propName: 'appKey', pluralTitle: i18n.t('Apps'), diff --git a/src/pages/edit/ItemSelector/ItemSelector.js b/src/pages/edit/ItemSelector/ItemSelector.js index 5b104b887..fc9d7046d 100644 --- a/src/pages/edit/ItemSelector/ItemSelector.js +++ b/src/pages/edit/ItemSelector/ItemSelector.js @@ -59,7 +59,7 @@ const ItemSelector = () => { const itemCount = getDefaultItemCount(type) const allItems = items[itemType.endPointName] const hasMore = allItems.length > itemCount - const displayItems = maxOptions.has(itemType.id) + const displayItems = maxOptions.has(type) ? allItems : allItems.slice(0, itemCount)