1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-04-28 22:42:26 +00:00
bramw_baserow/web-frontend/modules/database/components/row/RowEditFieldFormula.vue
2021-11-24 10:53:00 +00:00

28 lines
959 B
Vue

<template>
<component :is="getComponent(field)" v-bind="$props" read-only></component>
</template>
<script>
import rowEditField from '@baserow/modules/database/mixins/rowEditField'
import RowEditFieldDateReadOnly from '@baserow/modules/database/components/row/RowEditFieldDateReadOnly'
import RowEditFieldText from '@baserow/modules/database/components/row/RowEditFieldText'
import RowEditFieldBoolean from '@baserow/modules/database/components/row/RowEditFieldBoolean'
import RowEditFieldNumber from '@baserow/modules/database/components/row/RowEditFieldNumber'
export default {
name: 'RowEditFieldFormula',
components: {
RowEditFieldDateReadOnly,
RowEditFieldText,
RowEditFieldBoolean,
RowEditFieldNumber,
},
mixins: [rowEditField],
methods: {
getComponent(field) {
const formulaType = this.$registry.get('formula_type', field.formula_type)
return formulaType.getRowEditFieldComponent()
},
},
}
</script>