Files
baserow/web-frontend/modules/database/components/card/RowCardFieldFormula.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

44 lines
761 B
Vue

<template>
<component
:is="componentType"
v-if="componentType"
:row="row"
:field="field"
:value="value"
></component>
<div v-else class="card-text">Unknown Field Type</div>
</template>
<script>
export default {
height: 22,
name: 'RowCardFieldFormula',
props: {
row: {
type: Object,
required: true,
},
field: {
type: Object,
required: true,
},
value: {
type: null,
default: null,
},
},
computed: {
componentType() {
if (!this.$registry) {
return null
}
const formulaType = this.$registry.get(
'formula_type',
this.field.formula_type
)
return formulaType.getCardComponent(this.field)
},
},
}
</script>