mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 08:18:42 +00:00
Update the nuxt3 version. Co-authored-by: Jonathan Adeline <jonathan@baserow.io> Co-authored-by: Bram Wiepjes <bramw@protonmail.com> Co-authored-by: Cezary <cezary@baserow.io> Co-authored-by: Tsering Paljor <tsering@baserow.io> Co-authored-by: Przemyslaw Kukulski <przemyslaw+gh@baserow.io> Co-authored-by: Bram <bram2w@users.noreply.github.com>
44 lines
907 B
JavaScript
44 lines
907 B
JavaScript
/**
|
|
* A mixin for the builder setting components which have forms. This mixin makes
|
|
* it easier to make them immediately display their "create" form from the parent
|
|
* builder settings modal. When `force-display-form` is set, the end-user doesn't
|
|
* have to click a "New" button.
|
|
*/
|
|
export default {
|
|
emits: ['hide-modal'],
|
|
|
|
props: {
|
|
builder: {
|
|
type: Object,
|
|
required: true,
|
|
},
|
|
forceDisplayForm: {
|
|
type: Boolean,
|
|
required: false,
|
|
default: false,
|
|
},
|
|
hideAfterCreate: {
|
|
type: Boolean,
|
|
required: false,
|
|
default: false,
|
|
},
|
|
},
|
|
data() {
|
|
return {
|
|
showForm: false,
|
|
}
|
|
},
|
|
mounted() {
|
|
if (this.forceDisplayForm) {
|
|
this.showForm = true
|
|
}
|
|
},
|
|
methods: {
|
|
hideModalIfRequired(createdRecordId) {
|
|
if (this.hideAfterCreate) {
|
|
this.$emit('hide-modal', createdRecordId)
|
|
}
|
|
},
|
|
},
|
|
}
|