mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
disable copying valueless cell
This commit is contained in:
@@ -18,12 +18,11 @@ export default function ContextMenuItem({
|
||||
onClick,
|
||||
icon,
|
||||
label,
|
||||
disabled,
|
||||
hotkeyLabel,
|
||||
...props
|
||||
}: IContextMenuItem) {
|
||||
return (
|
||||
<MenuItem {...props} disabled={disabled} onClick={onClick}>
|
||||
<MenuItem {...props} onClick={onClick}>
|
||||
<ListItemIcon>{icon}</ListItemIcon>
|
||||
<ListItemText>{label}</ListItemText>
|
||||
{hotkeyLabel && (
|
||||
|
||||
@@ -92,7 +92,13 @@ export const BasicContextMenuActions: IFieldConfig["contextMenuActions"] = (
|
||||
|
||||
const contextMenuActions = [
|
||||
// { label: "Cut", icon: <Cut />, onClick: handleCut },
|
||||
{ label: "Copy", icon: <CopyCells />, onClick: handleCopy },
|
||||
{
|
||||
label: "Copy",
|
||||
icon: <CopyCells />,
|
||||
onClick: handleCopy,
|
||||
disabled:
|
||||
cellValue === undefined || cellValue === null || cellValue === "",
|
||||
},
|
||||
{ label: "Paste", icon: <Paste />, onClick: handlePaste },
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user