Add menu option to edit rows in modal

This commit is contained in:
Andrew Kingston 2023-04-17 18:53:44 +01:00
parent 5d964a756c
commit 508cb6c58f
1 changed files with 13 additions and 4 deletions

View File

@ -12,6 +12,7 @@
config,
copiedCell,
clipboard,
dispatch,
} = getContext("sheet")
$: style = makeStyle($menu)
@ -55,11 +56,12 @@
Paste
</MenuItem>
<MenuItem
icon="Delete"
disabled={!$config.allowDeleteRows}
on:click={deleteRow}
icon="Maximize"
disabled={!$config.allowEditRows}
on:click={() => dispatch("edit-row", $focusedRow)}
on:click={menu.actions.close}
>
Delete row
Edit row in modal
</MenuItem>
<MenuItem
icon="Duplicate"
@ -68,6 +70,13 @@
>
Duplicate row
</MenuItem>
<MenuItem
icon="Delete"
disabled={!$config.allowDeleteRows}
on:click={deleteRow}
>
Delete row
</MenuItem>
</Menu>
</div>
{/if}