Browse Source

fix(nc-gui): on escape lose link record input focus

pull/7623/head
Ramesh Mane 10 months ago
parent
commit
ec25f7e56d
  1. 10
      packages/nc-gui/components/virtual-cell/components/ListChildItems.vue
  2. 10
      packages/nc-gui/components/virtual-cell/components/ListItems.vue

10
packages/nc-gui/components/virtual-cell/components/ListChildItems.vue

@ -41,7 +41,7 @@ const injectedColumn = inject(ColumnInj, ref())
const readOnly = inject(ReadonlyInj, ref(false))
const filterQueryRef = ref()
const filterQueryRef = ref<HTMLInputElement>()
const { isSharedBase } = storeToRefs(useBase())
@ -213,7 +213,13 @@ watch([filterQueryRef, isDataExist], () => {
class="w-full !sm:rounded-md xs:min-h-8 !xs:rounded-xl"
size="small"
:bordered="false"
@keydown.capture.stop
@keydown.capture.stop="
(e) => {
if (e.key === 'Escape') {
filterQueryRef?.blur()
}
}
"
@change="childrenListPagination.page = 1"
>
</a-input>

10
packages/nc-gui/components/virtual-cell/components/ListItems.vue

@ -27,7 +27,7 @@ const injectedColumn = inject(ColumnInj)
const { isSharedBase } = storeToRefs(useBase())
const filterQueryRef = ref()
const filterQueryRef = ref<HTMLInputElement>()
const { t } = useI18n()
@ -251,7 +251,13 @@ const onCreatedRecord = (record: any) => {
class="w-full !rounded-md nc-excluded-search xs:min-h-8"
size="small"
:bordered="false"
@keydown.capture.stop
@keydown.capture.stop="
(e) => {
if (e.key === 'Escape') {
filterQueryRef?.blur()
}
}
"
@change="childrenExcludedListPagination.page = 1"
>
</a-input>

Loading…
Cancel
Save