Skip to content

Commit 143769e

Browse files
committed
fix: only show table actions if editing is allowed
Signed-off-by: Max <max@nextcloud.com>
1 parent 96dc8b8 commit 143769e

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/nodes/TableCellView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<NodeViewWrapper as="td">
2525
<div class="container">
2626
<NodeViewContent class="content" />
27-
<Actions>
27+
<Actions v-if="editor.isEditable">
2828
<ActionButton icon="icon-add_row_before"
2929
:close-after-click="true"
3030
@click="addRowBefore">

src/nodes/TableHeaderView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<NodeViewWrapper as="th">
2525
<div>
2626
<NodeViewContent class="content" />
27-
<Actions>
27+
<Actions v-if="editor.isEditable">
2828
<ActionButton icon="icon-add_col_before"
2929
:close-after-click="true"
3030
@click="addColumnBefore">

src/nodes/TableView.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
<template>
2424
<NodeViewWrapper class="table-wrapper">
2525
<NodeViewContent class="content" as="table" />
26-
<Actions :force-menu="true"
26+
<Actions v-if="editor.isEditable"
27+
:force-menu="true"
2728
class="table-settings"
2829
default-icon="icon-table_settings">
2930
<ActionButton icon="icon-delete"

0 commit comments

Comments
 (0)