Skip to main content

Button

Basic

{
typeCell: 'button',
label: 'Click me',
handleClick: () => alert('Hello')
}

Disabled

{
typeCell: 'button',
label: 'Cannot be clicked',
isDisabled: true
}

Async

The handleClick props can be an async function. If it's the case, the component will display the loading state until the promise is completed.

{
typeCell: 'button',
label: 'Click to wait 1 sec',
handleClick: myAsyncFunction
}

Hidden

{
typeCell: 'button',
label: 'Do you see me ?',
showCellButton: false
}
NameTypeRequiredDefaultDescription
handleClickfuncNo() => {}Callback fired when the button is clicked. It receives the row and the dataKey as arguments.
labelanyNo''Element passed as a children to Button
showCellButtonboolNotrueIf false, the button is not rendered