Files
baserow/web-frontend/modules/database/components/row/RowEditFieldRating.vue

35 lines
749 B
Vue

<template>
<div class="control__elements">
<div class="field-rating">
<Rating
:rating-style="field.style"
:color="field.color"
:value="value"
:max-value="field.max_value"
:read-only="readOnly"
@update="update"
/>
</div>
<div v-show="touched && !isValid()" class="error">
{{ getError() }}
</div>
</div>
</template>
<script>
import rowEditField from '@baserow/modules/database/mixins/rowEditField'
import Rating from '@baserow/modules/database/components/Rating'
export default {
components: { Rating },
mixins: [rowEditField],
emits: ['update'],
methods: {
update(newValue) {
this.$emit('update', newValue, this.value)
},
},
}
</script>