mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-04-12 08:18:07 +00:00
48 lines
1.1 KiB
Vue
48 lines
1.1 KiB
Vue
<template>
|
|
<Modal ref="modal" class="select-row-modal" @hidden="$emit('hidden')">
|
|
<!--
|
|
Because of how the moveToBody mixin works it takes a small moment before the $refs
|
|
become available. In order for the Scrollbars components to work the refs need to
|
|
be available right away. That is the reason why the contents of the SelectRowModal
|
|
have been moved to a separate component.
|
|
-->
|
|
<SelectRowContent
|
|
:table-id="tableId"
|
|
:value="value"
|
|
@selected="selected"
|
|
@hide="hide"
|
|
></SelectRowContent>
|
|
</Modal>
|
|
</template>
|
|
|
|
<script>
|
|
import modal from '@baserow/modules/core/mixins/modal'
|
|
|
|
import SelectRowContent from './SelectRowContent'
|
|
|
|
export default {
|
|
name: 'SelectRowModal',
|
|
components: { SelectRowContent },
|
|
mixins: [modal],
|
|
props: {
|
|
tableId: {
|
|
type: Number,
|
|
required: true,
|
|
},
|
|
value: {
|
|
type: Array,
|
|
required: false,
|
|
default: () => [],
|
|
},
|
|
},
|
|
methods: {
|
|
/**
|
|
* Hide the modal when a row has been selected.
|
|
*/
|
|
selected(...args) {
|
|
this.hide()
|
|
this.$emit('selected', ...args)
|
|
},
|
|
},
|
|
}
|
|
</script>
|