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-form ref="form" v-model="valid">
<v-container fluid @click.stop.prevent> <v-container fluid @click.stop.prevent>
<v-row> <v-row>
<v-col cols="12" class="d-flex pb-0"> <v-col cols="12" class="mt-2">
<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-text-field <v-text-field
ref="column" ref="column"
v-model="newColumn.cn" v-model="newColumn.cn"
@ -34,6 +25,7 @@
dense dense
outlined outlined
@input="newColumn.altered = newColumn.altered || 8" @input="newColumn.altered = newColumn.altered || 8"
@keyup.enter="save"
/> />
</v-col> </v-col>
<v-container <v-container
@ -408,6 +400,15 @@
</div> </div>
</v-row> </v-row>
</v-container> </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-row>
</v-container> </v-container>
</v-form> </v-form>

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

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

Loading…
Cancel
Save