Skip to content

Commit

Permalink
fix: only show table actions if editing is allowed
Browse files Browse the repository at this point in the history
Signed-off-by: Max <max@nextcloud.com>
  • Loading branch information
max-nextcloud committed Apr 11, 2022
1 parent 96dc8b8 commit 143769e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/nodes/TableCellView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<NodeViewWrapper as="td">
<div class="container">
<NodeViewContent class="content" />
<Actions>
<Actions v-if="editor.isEditable">
<ActionButton icon="icon-add_row_before"
:close-after-click="true"
@click="addRowBefore">
Expand Down
2 changes: 1 addition & 1 deletion src/nodes/TableHeaderView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<NodeViewWrapper as="th">
<div>
<NodeViewContent class="content" />
<Actions>
<Actions v-if="editor.isEditable">
<ActionButton icon="icon-add_col_before"
:close-after-click="true"
@click="addColumnBefore">
Expand Down
3 changes: 2 additions & 1 deletion src/nodes/TableView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
<template>
<NodeViewWrapper class="table-wrapper">
<NodeViewContent class="content" as="table" />
<Actions :force-menu="true"
<Actions v-if="editor.isEditable"
:force-menu="true"
class="table-settings"
default-icon="icon-table_settings">
<ActionButton icon="icon-delete"
Expand Down

0 comments on commit 143769e

Please sign in to comment.