mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 08:18:42 +00:00
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>
55 lines
1.2 KiB
Vue
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>
|