diff --git a/src/components/Table/components/ToolbarAction/index.tsx b/src/components/Table/components/ToolbarAction/index.tsx index 15eacba1..0f093354 100644 --- a/src/components/Table/components/ToolbarAction/index.tsx +++ b/src/components/Table/components/ToolbarAction/index.tsx @@ -49,7 +49,12 @@ const TableToolbarAction: FC = ({ const style = useMemo((): CSSProperties => ({ marginLeft: index > 0 ? "8px" : "none" }), [index]); - const onClick = useCallback(() => callback(data, dataCallbackOptions), [callback, data, dataCallbackOptions]); + const global = useMemo(() => position === "icon" || position === "toolbar", [position]); + + const onClick = useCallback( + () => callback(!global ? data : undefined, dataCallbackOptions), + [callback, data, dataCallbackOptions, global] + ); if (secondary) { return (