Skip to main content

Selection

If you need to make your rows selectable you can do it via the selectionConfig prop of <Table />.

You have the ability to render a selector at the start of each line and define a callback for when it's pressed. You can also choose whether to show a global selector for all page elements within the header.


import { SelectionRendererProps } from 'retables';

function SelectionCell(props: SelectionRendererProps) {
return (
<div className='flex justify-center h-full w-full'>
<input
type='checkbox'
checked={props.checked}
onChange={props.onChange}
className='accent-violet-800 dark:accent-violet-200'
/>
</div>
);
}
info

As mentioned in the Basic Personalization section, you can apply custom row styles only to the selected row.