Skip to content

Commit

Permalink
fix(table): fix rendering boolean (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
conglei authored and zhaoyongjie committed Nov 26, 2021
1 parent 823a661 commit 33e9610
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export default function getRenderer({
{format ? (
format.format(value as number & Date)
) : (
<HTMLRenderer value={value as string} />
<HTMLRenderer value={String(value)} />
)}
</Parent>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,66 +1,76 @@
/* eslint-disable sort-keys */
export default {
columns: ['name', 'sum__num', '%sum__num', 'trend'],
columns: ['name', 'sum__num', '%sum__num', 'trend', 'is_girl'],
records: [
{
name: 'Michael',
sum__num: 2467063,
'%sum__num': 0.2,
trend: 10,
trend: 0,
is_girl: false,
},
{
name: 'Christopher',
sum__num: 1725265,
'%sum__num': 0.2,
trend: 17,
is_girl: true,
},
{
name: 'David',
sum__num: 1570516,
'%sum__num': 0.15,
trend: 21,
is_girl: true,
},
{
name: 'James',
sum__num: 1506025,
'%sum__num': 0.14,
trend: 1,
is_girl: true,
},
{
name: 'john',
sum__num: 1426074,
'%sum__num': 0.12,
trend: -2,
is_girl: true,
},
{
name: 'Matthew',
sum__num: 1355803,
'%sum__num': 0.1,
trend: -10,
is_girl: true,
},
{
name: 'Robert',
sum__num: 1314800,
'%sum__num': 0.03,
trend: 24,
is_girl: true,
},
{
name: 'Daniel',
sum__num: 1159354,
'%sum__num': 0.02,
trend: 25,
is_girl: true,
},
{
name: 'Joseph',
sum__num: 1114098,
'%sum__num': 0.02,
trend: 10,
is_girl: false,
},
{
name: 'William',
sum__num: 1113701,
'%sum__num': 0.02,
trend: 10,
is_girl: null,
},
],
};

0 comments on commit 33e9610

Please sign in to comment.