Skip to content

Commit

Permalink
fix: Grab name from 'items' when necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
janhenrikoverland committed Sep 23, 2024
1 parent 8ea9a96 commit dfc00b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/PivotTable/PivotTableTitleRows.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { PivotTableTitleRow } from './PivotTableTitleRow.js'

export const PivotTableTitleRows = ({ clippingResult, width }) => {
const engine = usePivotTableEngine()

return (
<>
{engine.options.title ? (
Expand Down
4 changes: 3 additions & 1 deletion src/modules/getOuLevelAndGroupText.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dfc00b2

Please sign in to comment.