Browse Source

fix(nc-gui): linked record keyboard navigation

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

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

@ -89,7 +89,8 @@ const displayValue = computed(() => {
<template> <template>
<a-card <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="{ :class="{
'!bg-white': isLoading, '!bg-white': isLoading,
'!border-1': isLinked && !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 expandedFormDlg = true
} }
" "
@keydown.space.prevent="() => onClick(refRow, id)"
@click="() => onClick(refRow, id)" @click="() => onClick(refRow, id)"
/> />
</template> </template>

Loading…
Cancel
Save