Browse Source

fix: percent field text select on focus issue

pull/7298/head
Ramesh Mane 8 months ago
parent
commit
4f4a071515
  1. 1
      packages/nc-gui/components/cell/Percent.vue
  2. 8
      packages/nc-gui/components/smartsheet/expanded-form/Comments.vue
  3. 13
      packages/nc-gui/components/virtual-cell/Formula.vue

1
packages/nc-gui/components/cell/Percent.vue

@ -69,6 +69,7 @@ const onWrapperFocus = () => {
nextTick(() => {
wrapperRef.value?.querySelector('input')?.focus()
wrapperRef.value?.querySelector('input')?.select()
})
}

8
packages/nc-gui/components/smartsheet/expanded-form/Comments.vue

@ -116,11 +116,11 @@ const saveComment = async () => {
console.error(e)
} finally {
isSaving.value = false
setTimeout(() => {
commentInputDomRef.value?.focus()
}, 400)
}
nextTick(() => {
commentInputDomRef.value?.focus()
})
}
watch(commentsWrapperEl, () => {

13
packages/nc-gui/components/virtual-cell/Formula.vue

@ -2,7 +2,17 @@
import { handleTZ } from 'nocodb-sdk'
import type { ColumnType } from 'nocodb-sdk'
import type { Ref } from 'vue'
import { CellValueInj, ColumnInj, IsExpandedFormOpenInj, computed, inject, renderValue, replaceUrlsWithLink, useBase, useGlobal } from '#imports'
import {
CellValueInj,
ColumnInj,
IsExpandedFormOpenInj,
computed,
inject,
renderValue,
replaceUrlsWithLink,
useBase,
useGlobal,
} from '#imports'
// todo: column type doesn't have required property `error` - throws in typecheck
const column = inject(ColumnInj) as Ref<ColumnType & { colOptions: { error: any } }>
@ -42,7 +52,6 @@ const { showEditNonEditableFieldWarning, showClearNonEditableFieldWarning, activ
}"
@dblclick="activateShowEditNonEditableFieldWarning"
>
<div v-if="urls" v-html="urls" />
<div v-else>{{ result }}</div>

Loading…
Cancel
Save