Add menu option to edit rows in modal
This commit is contained in:
parent
5d964a756c
commit
508cb6c58f
|
@ -12,6 +12,7 @@
|
||||||
config,
|
config,
|
||||||
copiedCell,
|
copiedCell,
|
||||||
clipboard,
|
clipboard,
|
||||||
|
dispatch,
|
||||||
} = getContext("sheet")
|
} = getContext("sheet")
|
||||||
|
|
||||||
$: style = makeStyle($menu)
|
$: style = makeStyle($menu)
|
||||||
|
@ -55,11 +56,12 @@
|
||||||
Paste
|
Paste
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
icon="Delete"
|
icon="Maximize"
|
||||||
disabled={!$config.allowDeleteRows}
|
disabled={!$config.allowEditRows}
|
||||||
on:click={deleteRow}
|
on:click={() => dispatch("edit-row", $focusedRow)}
|
||||||
|
on:click={menu.actions.close}
|
||||||
>
|
>
|
||||||
Delete row
|
Edit row in modal
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
icon="Duplicate"
|
icon="Duplicate"
|
||||||
|
@ -68,6 +70,13 @@
|
||||||
>
|
>
|
||||||
Duplicate row
|
Duplicate row
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
<MenuItem
|
||||||
|
icon="Delete"
|
||||||
|
disabled={!$config.allowDeleteRows}
|
||||||
|
on:click={deleteRow}
|
||||||
|
>
|
||||||
|
Delete row
|
||||||
|
</MenuItem>
|
||||||
</Menu>
|
</Menu>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
Loading…
Reference in New Issue