Skip to content

Commit 72cacc6

Browse files
fix: not possible to see more or search for App items when creating dashboard (#3187)
Fixes DHIS2-18835 Fix: the Item selector list is populated based on the item type, but for some reason the code for setting which types should "Show more" was using itemType.id, which APP lacked. Now, it will consistently check the type rather than id. But also, the id property for APP was added to the itemTypes object, for code consistency.
1 parent 15cde91 commit 72cacc6

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/modules/itemTypes.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ export const itemTypeMap = {
137137
appKey: 'line-listing',
138138
},
139139
[APP]: {
140+
id: APP,
140141
endPointName: 'apps',
141142
propName: 'appKey',
142143
pluralTitle: i18n.t('Apps'),

src/pages/edit/ItemSelector/ItemSelector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const ItemSelector = () => {
5959
const itemCount = getDefaultItemCount(type)
6060
const allItems = items[itemType.endPointName]
6161
const hasMore = allItems.length > itemCount
62-
const displayItems = maxOptions.has(itemType.id)
62+
const displayItems = maxOptions.has(type)
6363
? allItems
6464
: allItems.slice(0, itemCount)
6565

0 commit comments

Comments
 (0)