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
}
Name | Type | Required | Default | Description |
---|---|---|---|---|
handleClick | func | No | () => {} | Callback fired when the button is clicked. It receives the row and the dataKey as arguments. |
label | any | No | '' | Element passed as a children to Button |
showCellButton | bool | No | true | If false , the button is not rendered |