Disable pasting for readonly cells
This commit is contained in:
parent
aa98cf72f5
commit
f8a9af2458
|
@ -54,7 +54,9 @@
|
|||
clipboard.actions.copy()
|
||||
break
|
||||
case "v":
|
||||
clipboard.actions.paste()
|
||||
if (!api?.isReadonly()) {
|
||||
clipboard.actions.paste()
|
||||
}
|
||||
break
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
copiedCell,
|
||||
clipboard,
|
||||
dispatch,
|
||||
focusedCellAPI,
|
||||
} = getContext("grid")
|
||||
|
||||
$: style = makeStyle($menu)
|
||||
|
@ -49,7 +50,7 @@
|
|||
</MenuItem>
|
||||
<MenuItem
|
||||
icon="Paste"
|
||||
disabled={$copiedCell == null}
|
||||
disabled={$copiedCell == null || $focusedCellAPI?.isReadonly()}
|
||||
on:click={clipboard.actions.paste}
|
||||
on:click={menu.actions.close}
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue