Browse Source

fix(nc-gui): duration focus issue

pull/4205/head
Wing-Kam Wong 2 years ago
parent
commit
1d89c7c8d3
  1. 5
      packages/nc-gui/components/cell/Duration.vue

5
packages/nc-gui/components/cell/Duration.vue

@ -1,4 +1,5 @@
<script setup lang="ts">
import type { VNodeRef } from '@vue/runtime-core'
import {
ColumnInj,
EditModeInj,
@ -67,13 +68,15 @@ const submitDuration = () => {
}
isEdited.value = false
}
const focus: VNodeRef = (el) => (el as HTMLInputElement)?.focus()
</script>
<template>
<div class="duration-cell-wrapper">
<input
v-if="editEnabled"
ref="durationInput"
:ref="focus"
v-model="localState"
class="w-full !border-none p-0"
:class="{ '!px-2': editEnabled }"

Loading…
Cancel
Save