Files
baserow/web-frontend/modules/database/components/view/grid/fields/FunctionalGridViewFieldLinkRow.vue
716d43a9a8 Nuxt 3 migration (#4342)
Update the nuxt3 version.

Co-authored-by: Jonathan Adeline <jonathan@baserow.io>
Co-authored-by: Bram Wiepjes <bramw@protonmail.com>
Co-authored-by: Cezary <cezary@baserow.io>
Co-authored-by: Tsering Paljor <tsering@baserow.io>
Co-authored-by: Przemyslaw Kukulski <przemyslaw+gh@baserow.io>
Co-authored-by: Bram <bram2w@users.noreply.github.com>
2026-01-22 10:27:19 +01:00

55 lines
1.2 KiB
Vue

<template>
<div class="grid-view__cell grid-field-many-to-many__cell">
<div class="grid-field-many-to-many__list">
<div
v-for="item in value"
:key="item.id"
class="grid-field-many-to-many__item"
>
<span
class="grid-field-many-to-many__name"
:class="{
'grid-field-link-row__unnamed':
item.value === null || item.value === '',
}"
:title="item.value"
>
{{
item.value ||
$t('functionnalGridViewFieldLinkRow.unnamed', {
value: item.id,
})
}}
</span>
</div>
<div v-if="shouldFetchRow" class="grid-field-many-to-many__item">...</div>
</div>
</div>
</template>
<script>
import { LINKED_ITEMS_DEFAULT_LOAD_COUNT } from '@baserow/modules/database/constants'
export default {
name: 'FunctionalGridViewFieldLinkRow',
props: {
value: {
type: Array,
default: () => [],
},
row: {
type: Object,
required: true,
},
},
computed: {
shouldFetchRow() {
return (
this.value?.length === LINKED_ITEMS_DEFAULT_LOAD_COUNT &&
!this.row._?.fullyLoaded
)
},
},
}
</script>