Browse Source

fix(nc-gui): linked record keyboard navigation

pull/7624/head
DarkPhoenix2704 6 months ago
parent
commit
a6d25f68e0
  1. 3
      packages/nc-gui/components/virtual-cell/components/ListChildItems.vue
  2. 3
      packages/nc-gui/components/virtual-cell/components/ListItem.vue
  3. 1
      packages/nc-gui/components/virtual-cell/components/ListItems.vue

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

@ -1,6 +1,6 @@
<script lang="ts" setup>
import { type ColumnType, isLinksOrLTAR, isSystemColumn } from 'nocodb-sdk'
import type { Row } from '#imports'
import { type Row } from '#imports'
import InboxIcon from '~icons/nc-icons/inbox'
import {
@ -271,6 +271,7 @@ watch([filterQueryRef, isDataExist], () => {
:is-linked="childrenList?.list ? isChildrenListLinked[Number.parseInt(id)] : true"
:is-loading="isChildrenListLoading[Number.parseInt(id)]"
@expand="onClick(refRow)"
@keydown.space.prevent="linkOrUnLink(refRow, id)"
@click="linkOrUnLink(refRow, id)"
/>
</template>

3
packages/nc-gui/components/virtual-cell/components/ListItem.vue

@ -89,7 +89,8 @@ const displayValue = computed(() => {
<template>
<a-card
class="nc-list-item !border-1 group transition-all !rounded-xl relative !mb-2 !border-gray-200 hover:bg-gray-50"
tabindex="0"
class="nc-list-item !outline-brand-500 !border-1 group transition-all !rounded-xl relative !mb-2 !border-gray-200 hover:bg-gray-50"
:class="{
'!bg-white': isLoading,
'!border-1': isLinked && !isLoading,

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

@ -328,6 +328,7 @@ const onCreatedRecord = (record: any) => {
expandedFormDlg = true
}
"
@keydown.space.prevent="() => onClick(refRow, id)"
@click="() => onClick(refRow, id)"
/>
</template>

Loading…
Cancel
Save