actions
The actions
prop is used to be appended on the end of each row when using the default implementation of the rowRenderer
. This expects a function which gets a single argument being the row object and should return a valid React element.
import { useSet } from 'react-use'
const [checked, { has, toggle }] = useSet()
<Table
actions={id => (
<a onClick={() => toggle(id)}>
{has(id) ? 'Unflag' : 'Flag'}
</a>
)}
/>