From dfc00b2aa04842b1400b62a7da245c55aca65c8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Henrik=20=C3=98verland?= Date: Mon, 23 Sep 2024 12:32:15 +0200 Subject: [PATCH] fix: Grab name from 'items' when necessary --- src/components/PivotTable/PivotTableTitleRows.js | 1 + src/modules/getOuLevelAndGroupText.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/PivotTable/PivotTableTitleRows.js b/src/components/PivotTable/PivotTableTitleRows.js index 8a3439c9d..b29439261 100644 --- a/src/components/PivotTable/PivotTableTitleRows.js +++ b/src/components/PivotTable/PivotTableTitleRows.js @@ -6,6 +6,7 @@ import { PivotTableTitleRow } from './PivotTableTitleRow.js' export const PivotTableTitleRows = ({ clippingResult, width }) => { const engine = usePivotTableEngine() + return ( <> {engine.options.title ? ( diff --git a/src/modules/getOuLevelAndGroupText.js b/src/modules/getOuLevelAndGroupText.js index f92e612c2..a7622e28f 100644 --- a/src/modules/getOuLevelAndGroupText.js +++ b/src/modules/getOuLevelAndGroupText.js @@ -28,7 +28,9 @@ export const getOuLevelAndGroupText = (filter, metaData) => { const getLevelAndGroupText = (items, metaData, isLevel) => { const getNameFromMetadata = (id) => - metaData.items[id] ? metaData.items[id].name : id + metaData.items[id] + ? metaData.items[id].name + : items.find((item) => item.id === id)?.name || id const dynamicOuItems = items.filter((item) => isLevel