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/field/FieldSelectOptionsDropdownItem.vue

44 lines
918 B
Vue

<template>
<li
class="select-options__dropdown-item"
:class="{
hidden: !isVisible(query),
active: isActive(value),
disabled: disabled,
hover: isHovering(value),
}"
>
<a
class="select-options__dropdown-link"
@click="select(value, disabled)"
@mousemove="hover(value, disabled)"
>
<div v-if="multiple.value">
<Checkbox :disabled="disabled" :checked="isActive(value)"></Checkbox>
</div>
<div
class="select-options__dropdown-option"
:class="'background-color--' + color"
>
{{ name }}
</div>
</a>
</li>
</template>
<script>
import dropdownItem from '@baserow/modules/core/mixins/dropdownItem'
export default {
name: 'FieldSelectOptionsDropdownItem',
mixins: [dropdownItem],
props: {
color: {
type: String,
required: false,
default: '',
},
},
}
</script>