Browse Source

Merge pull request #4205 from nocodb/fix/duration

fix: duration issues
pull/4207/head
աɨռɢӄաօռɢ 2 years ago committed by GitHub
parent
commit
165731bac8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      packages/nc-gui/components/cell/Duration.vue

7
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,
@ -28,7 +29,7 @@ const durationInMS = ref(0)
const isEdited = ref(false)
const durationType = ref(column?.value?.meta?.duration || 0)
const durationType = computed(() => column?.value?.meta?.duration || 0)
const durationPlaceholder = computed(() => durationOptions[durationType.value].title)
@ -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