Browse Source

fix(gui-v2): grid contextmenu - use a-menu within a-dropdown

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3057/head
Pranav C 2 years ago
parent
commit
99a71d0096
  1. 16
      packages/nc-gui-v2/components/smartsheet/Grid.vue

16
packages/nc-gui-v2/components/smartsheet/Grid.vue

@ -373,14 +373,14 @@ const onNavigate = (dir: NavigateDir) => {
</tbody> </tbody>
</table> </table>
<template #overlay> <template #overlay>
<div class="bg-white shadow" @click="contextMenu = false"> <a-menu class="bg-white shadow" @click="contextMenu = false">
<div v-if="contextMenuTarget" class="nc-menu-item" @click="deleteRow(contextMenuTarget.row)">Delete row</div> <a-menu-item v-if="contextMenuTarget" @click="deleteRow(contextMenuTarget.row)"><span class="text-xs">Delete row</span></a-menu-item>
<div class="nc-menu-item" @click="deleteSelectedRows">Delete all selected rows</div> <a-menu-item @click="deleteSelectedRows"><span class="text-xs">Delete all selected rows</span></a-menu-item>
<div v-if="contextMenuTarget" class="nc-menu-item" @click="clearCell(contextMenuTarget)">Clear cell</div> <a-menu-item v-if="contextMenuTarget" @click="clearCell(contextMenuTarget)"><span class="text-xs">Clear cell</span></a-menu-item>
<div v-if="contextMenuTarget" class="nc-menu-item" @click="addEmptyRow(contextMenuTarget.row + 1)"> <a-menu-item v-if="contextMenuTarget" @click="addEmptyRow(contextMenuTarget.row + 1)">
Insert new row <span class="text-xs">Insert new row</span>
</div> </a-menu-item>
</div> </a-menu>
</template> </template>
</a-dropdown> </a-dropdown>
</div> </div>

Loading…
Cancel
Save