Skip to content

Commit

Permalink
fix: percent field text select on focus issue
Browse files Browse the repository at this point in the history
  • Loading branch information
rameshmane7218 committed Dec 27, 2023
1 parent c17860b commit 4f4a071
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
1 change: 1 addition & 0 deletions packages/nc-gui/components/cell/Percent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ const onWrapperFocus = () => {
nextTick(() => {
wrapperRef.value?.querySelector('input')?.focus()
wrapperRef.value?.querySelector('input')?.select()
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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, () => {
Expand Down
13 changes: 11 additions & 2 deletions packages/nc-gui/components/virtual-cell/Formula.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 } }>
Expand Down Expand Up @@ -42,7 +52,6 @@ const { showEditNonEditableFieldWarning, showClearNonEditableFieldWarning, activ
}"
@dblclick="activateShowEditNonEditableFieldWarning"
>

<div v-if="urls" v-html="urls" />

<div v-else>{{ result }}</div>
Expand Down

1 comment on commit 4f4a071

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR changes have been deployed. Please run the following command to verify:

docker run -d -p 8888:8080 nocodb/nocodb-timely:0.202.10-pr-7298-20231227-0552

Please sign in to comment.