1
0
mirror of https://gitlab.com/bramw/baserow.git synced 2024-11-24 16:36:46 +00:00
bramw_baserow/web-frontend/modules/database/components/card/RowCardFieldFormula.vue
2021-11-24 10:53:00 +00:00

24 lines
602 B
Vue

<template functional>
<component
:is="$options.methods.getComponent(props.field, parent.$registry)"
v-if="$options.methods.getComponent(props.field, parent.$registry)"
:field="props.field"
:value="props.value"
></component>
<div v-else class="card-text">Unknown Field Type</div>
</template>
<script>
export default {
height: 22,
name: 'RowCardFieldFormula',
components: {},
methods: {
getComponent(field, $registry) {
const formulaType = $registry.get('formula_type', field.formula_type)
return formulaType.getCardComponent(field)
},
},
}
</script>