From 04e73b84314e83d14e2b83a6b3f27e4ed873685e Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Wed, 22 Jan 2025 16:53:07 +0100 Subject: [PATCH 1/2] fix: not possible to see more or search for App items when editing dashboard (#3186) 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. --- 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 fd919f301..66e37fb53 100644 --- a/src/modules/itemTypes.js +++ b/src/modules/itemTypes.js @@ -145,6 +145,7 @@ export const itemTypeMap = { supportsFullscreen: true, }, [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) From 339f8375d2a930d9929bab14500c38f6a200c32a Mon Sep 17 00:00:00 2001 From: "@dhis2-bot" Date: Wed, 22 Jan 2025 15:55:14 +0000 Subject: [PATCH 2/2] chore(release): cut 100.4.2 [skip release] ## [100.4.2](https://github.com/dhis2/dashboard-app/compare/v100.4.1...v100.4.2) (2025-01-22) ### Bug Fixes * not possible to see more or search for App items when editing dashboard ([#3186](https://github.com/dhis2/dashboard-app/issues/3186)) ([04e73b8](https://github.com/dhis2/dashboard-app/commit/04e73b84314e83d14e2b83a6b3f27e4ed873685e)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cda22d75f..e2dbe7cac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [100.4.2](https://github.com/dhis2/dashboard-app/compare/v100.4.1...v100.4.2) (2025-01-22) + + +### Bug Fixes + +* not possible to see more or search for App items when editing dashboard ([#3186](https://github.com/dhis2/dashboard-app/issues/3186)) ([04e73b8](https://github.com/dhis2/dashboard-app/commit/04e73b84314e83d14e2b83a6b3f27e4ed873685e)) + ## [100.4.1](https://github.com/dhis2/dashboard-app/compare/v100.4.0...v100.4.1) (2025-01-09) diff --git a/package.json b/package.json index c651ae390..4dfb9de9b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dashboard-app", - "version": "100.4.1", + "version": "100.4.2", "description": "DHIS2 Dashboard app", "private": true, "license": "BSD-3-Clause",