1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-05-21 07:56:54 +00:00
bramw_baserow/web-frontend/modules/database/components/row/RowEditFieldBoolean.vue
2020-06-22 21:22:16 +02:00

26 lines
525 B
Vue

<template>
<div class="control__elements">
<div
class="field-boolean__checkbox"
:class="{ active: value }"
@click="toggle(value)"
>
<i class="fas fa-check check"></i>
</div>
</div>
</template>
<script>
import rowEditField from '@baserow/modules/database/mixins/rowEditField'
export default {
mixins: [rowEditField],
methods: {
toggle(value) {
const oldValue = !!value
const newValue = !value
this.$emit('update', newValue, oldValue)
},
},
}
</script>