File tree 1 file changed +16
-2
lines changed
packages/bento-design-system/stories/Components
1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,14 @@ const exampleColumnsWithFooter = [
114
114
hint : { onPress : action ( "hint" ) } ,
115
115
footer : ( { rows } ) =>
116
116
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
+ )
118
125
) ,
119
126
} ) ,
120
127
tableColumn . numberWithIcon ( {
@@ -193,7 +200,14 @@ const exampleGroupedColumns = [
193
200
hint : { onPress : action ( "hint" ) } ,
194
201
footer : ( { rows } ) =>
195
202
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
+ )
197
211
) ,
198
212
} ) ,
199
213
tableColumn . numberWithIcon ( {
You can’t perform that action at this time.
0 commit comments