如何将 2 个或更多变量传递给自定义组件?我在返回函数中有一个 Griddle 网格:
<Griddle
data={myList}
useGriddleStyles={false}
enableSettings={false}
sortProperties={sortProperties}
plugins={[plugins.LocalPlugin]}
>
<RowDefinition>
<ColumnDefinition id="id" title="Id" customComponent={CustomLocation} />
<ColumnDefinition id="name" title="Name" />
</RowDefinition>
</Griddle>
和自定义组件:
const CustomLocation = ({ value }) => (
<Link to={`/testpage/edit/${value}/`}>Edit</Link>
);
我需要链接中的两个变量。第一个变量应该是 id 列的值和第二个 name 列的值。目前我只能通过id。