Browse Source

refactor: add/delete column dialog response to enter/esc key

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/958/head
Raju Udava 3 years ago
parent
commit
0ee9059add
  1. 21
      packages/nc-gui/components/project/spreadsheet/components/editColumn.vue
  2. 2
      packages/nc-gui/components/project/spreadsheet/components/headerCell.vue

21
packages/nc-gui/components/project/spreadsheet/components/editColumn.vue

@ -9,16 +9,7 @@
<v-form ref="form" v-model="valid">
<v-container fluid @click.stop.prevent>
<v-row>
<v-col cols="12" class="d-flex pb-0">
<v-spacer />
<v-btn small outlined @click="close">
Cancel
</v-btn>
<v-btn small color="primary" :disabled="!valid" @click="save">
Save
</v-btn>
</v-col>
<v-col cols="12">
<v-col cols="12" class="mt-2">
<v-text-field
ref="column"
v-model="newColumn.cn"
@ -34,6 +25,7 @@
dense
outlined
@input="newColumn.altered = newColumn.altered || 8"
@keyup.enter="save"
/>
</v-col>
<v-container
@ -408,6 +400,15 @@
</div>
</v-row>
</v-container>
<v-col cols="12" class="d-flex pt-0">
<v-spacer />
<v-btn small outlined @click="close">
Cancel
</v-btn>
<v-btn small color="primary" :disabled="!valid" @click="save">
Save
</v-btn>
</v-col>
</v-row>
</v-container>
</v-form>

2
packages/nc-gui/components/project/spreadsheet/components/headerCell.vue

@ -105,6 +105,8 @@
<v-dialog
v-model="columnDeleteDialog"
@keydown.esc="columnDeleteDialog = false"
@keydown.enter="deleteColumn"
max-width="500"
persistent
>

Loading…
Cancel
Save