1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-04-12 16:28:06 +00:00
bramw_baserow/web-frontend/modules/database/components/row/RowEditFieldBoolean.vue
2020-05-11 17:27:35 +00:00

26 lines
523 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>