allow to cancel stack title edit
Signed-off-by: Simon Hötten <s+git@hoetten.org>
This commit is contained in:
committed by
Julius Härtl
parent
95837d0626
commit
0ae73b57d5
@@ -41,7 +41,10 @@
|
|||||||
@keydown.enter="startEditing(stack)">
|
@keydown.enter="startEditing(stack)">
|
||||||
{{ stack.title }}
|
{{ stack.title }}
|
||||||
</h3>
|
</h3>
|
||||||
<form v-else @submit.prevent="finishedEdit(stack)">
|
<form v-else-if="editing"
|
||||||
|
v-click-outside="cancelEdit"
|
||||||
|
@submit.prevent="finishedEdit(stack)"
|
||||||
|
@keyup.esc="cancelEdit">
|
||||||
<input v-model="copiedStack.title"
|
<input v-model="copiedStack.title"
|
||||||
v-focus
|
v-focus
|
||||||
type="text"
|
type="text"
|
||||||
@@ -142,7 +145,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import ClickOutside from 'vue-click-outside'
|
||||||
import { mapGetters, mapState } from 'vuex'
|
import { mapGetters, mapState } from 'vuex'
|
||||||
import { Container, Draggable } from 'vue-smooth-dnd'
|
import { Container, Draggable } from 'vue-smooth-dnd'
|
||||||
|
|
||||||
@@ -164,7 +167,9 @@ export default {
|
|||||||
NcModal,
|
NcModal,
|
||||||
ArchiveIcon,
|
ArchiveIcon,
|
||||||
},
|
},
|
||||||
|
directives: {
|
||||||
|
ClickOutside,
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
stack: {
|
stack: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@@ -274,6 +279,9 @@ export default {
|
|||||||
}
|
}
|
||||||
this.editing = false
|
this.editing = false
|
||||||
},
|
},
|
||||||
|
cancelEdit() {
|
||||||
|
this.editing = false
|
||||||
|
},
|
||||||
async clickAddCard() {
|
async clickAddCard() {
|
||||||
this.stateCardCreating = true
|
this.stateCardCreating = true
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user