Browse Source

feat(nc-gui): focus on filter query for other keys

pull/4482/head
Wing-Kam Wong 2 years ago
parent
commit
5d761c5ee1
  1. 9
      packages/nc-gui/components/virtual-cell/components/ListItems.vue

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

@ -24,6 +24,8 @@ const vModel = useVModel(props, 'modelValue', emit)
const column = inject(ColumnInj)
const filterQueryRef = ref()
const {
childrenExcludedList,
loadChildrenExcludedList,
@ -141,6 +143,12 @@ useSelectedCellKeyupListener(vModel, (e: KeyboardEvent) => {
}
}
break
default: {
const el = filterQueryRef.value?.$el
if (el) {
filterQueryRef.value.$el.focus()
}
}
}
})
const activeRow = (vNode?: InstanceType<typeof Card>) => {
@ -159,6 +167,7 @@ const activeRow = (vNode?: InstanceType<typeof Card>) => {
<div class="max-h-[max(calc(100vh_-_300px)_,500px)] flex flex-col py-6">
<div class="flex mb-4 items-center gap-2 px-12">
<a-input
ref="filterQueryRef"
v-model:value="childrenExcludedListPagination.query"
:placeholder="$t('placeholder.filterQuery')"
class="max-w-[200px]"

Loading…
Cancel
Save