Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 533 Bytes

actions.md

File metadata and controls

22 lines (17 loc) · 533 Bytes
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>
  )}
/>