Skip to content

Commit 0f6db77

Browse files
committed
fix stories
1 parent c1d8902 commit 0f6db77

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

packages/bento-design-system/stories/Components/Table.stories.tsx

+16-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,14 @@ const exampleColumnsWithFooter = [
114114
hint: { onPress: action("hint") },
115115
footer: ({ rows }) =>
116116
Intl.NumberFormat("en").format(
117-
rows.reduce((acc, row) => acc + (row.values.applications ?? 0), 0)
117+
rows.reduce(
118+
(acc, row) =>
119+
acc +
120+
(typeof row.values.applications === "number"
121+
? row.values.applications ?? 0
122+
: row.values.applications?.numericValue ?? 0),
123+
0
124+
)
118125
),
119126
}),
120127
tableColumn.numberWithIcon({
@@ -193,7 +200,14 @@ const exampleGroupedColumns = [
193200
hint: { onPress: action("hint") },
194201
footer: ({ rows }) =>
195202
Intl.NumberFormat("en").format(
196-
rows.reduce((acc, row) => acc + (row.values.applications ?? 0), 0)
203+
rows.reduce(
204+
(acc, row) =>
205+
acc +
206+
(typeof row.values.applications === "number"
207+
? row.values.applications ?? 0
208+
: row.values.applications?.numericValue ?? 0),
209+
0
210+
)
197211
),
198212
}),
199213
tableColumn.numberWithIcon({

0 commit comments

Comments
 (0)