Skip to content

Commit db580ca

Browse files
committed
Allow declaring custom incon component in table actions
1 parent 6cd3bb2 commit db580ca

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/components/table/components/action.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const Action = ({
2929
iconColor,
3030
flavour = "borderless",
3131
CustomUIAction,
32+
CustomComponent,
3233
label,
3334
TooltipComponent = Tooltip,
3435
ref,
@@ -56,7 +57,7 @@ const Action = ({
5657
handleAction?.()
5758
}
5859

59-
const Component = label ? Button : IconButton
60+
const Component = CustomComponent || (label ? Button : IconButton)
6061

6162
return (
6263
<>
@@ -108,6 +109,7 @@ const Action = ({
108109
iconColor={iconColor}
109110
label={label}
110111
padding={[0.5]}
112+
data={currentRow?.original || selectedRows}
111113
{...rest}
112114
/>
113115
</Flex>

0 commit comments

Comments
 (0)