Skip to content

Commit 3d11e8d

Browse files
committed
fix(table): avoid Liquid syntax error in demo template literals
Replace template literals with string concatenation in the custom render demo to prevent Jekyll/Liquid from misinterpreting the double-brace pattern as Liquid variables.
1 parent b025fc5 commit 3d11e8d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

components/table/demo/custom-render.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Use the `render` property on columns to customize cell content with tags, links,
2222
render: (val) => (
2323
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
2424
<div style={{ flex: 1, height: 6, background: '#eee', borderRadius: 3 }}>
25-
<div style={{ width: `${val}%`, height: '100%', background: '#6e41bf', borderRadius: 3 }} />
25+
<div style={{ width: val + '%', height: '100%', background: '#6e41bf', borderRadius: 3 }} />
2626
</div>
2727
<span style={{ fontSize: 12 }}>{val}%</span>
2828
</div>
@@ -33,7 +33,7 @@ Use the `render` property on columns to customize cell content with tags, links,
3333
title: 'Action',
3434
dataIndex: 'action',
3535
render: (_, record) => (
36-
<a onClick={() => alert(`View ${record.name}`)}>View</a>
36+
<a onClick={() => alert('View ' + record.name)}>View</a>
3737
),
3838
},
3939
];

0 commit comments

Comments
 (0)