mirror of
https://github.com/baserow/baserow.git
synced 2026-12-06 17:28:38 +00:00
* fix: keep the trigger's table when testing a rows trigger node * chore: link the trigger table fix changelog entry to its issue
78 lines
1.9 KiB
Vue
78 lines
1.9 KiB
Vue
<template>
|
|
<form @submit.prevent>
|
|
<LocalBaserowServiceForm
|
|
ref="serviceForm"
|
|
:application="application"
|
|
:service-type="serviceType"
|
|
:default-values="defaultValues"
|
|
:enable-view-picker="false"
|
|
:databases="databases"
|
|
:form-choices-error="formChoicesError"
|
|
@values-changed="emitServiceChange($event)"
|
|
></LocalBaserowServiceForm>
|
|
</form>
|
|
</template>
|
|
|
|
<script>
|
|
import { computed, defineComponent, ref } from 'vue'
|
|
import LocalBaserowServiceForm from '@baserow/modules/integrations/localBaserow/components/services/LocalBaserowServiceForm'
|
|
|
|
export default defineComponent({
|
|
name: 'LocalBaserowSignalTriggerServiceForm',
|
|
components: { LocalBaserowServiceForm },
|
|
props: {
|
|
application: {
|
|
type: Object,
|
|
required: true,
|
|
},
|
|
service: {
|
|
type: Object,
|
|
required: true,
|
|
},
|
|
serviceType: {
|
|
type: Object,
|
|
required: true,
|
|
},
|
|
/**
|
|
* The databases to choose a table from, forwarded to the service form.
|
|
*/
|
|
databases: {
|
|
type: Array,
|
|
required: false,
|
|
default: () => [],
|
|
},
|
|
/**
|
|
* Why there is nothing to choose from, forwarded to the service form.
|
|
*/
|
|
formChoicesError: {
|
|
type: String,
|
|
required: false,
|
|
default: '',
|
|
},
|
|
},
|
|
emits: ['values-changed'],
|
|
setup(props, { emit }) {
|
|
// Follows the service rather than copying it once, so resetting the form,
|
|
// as the side panel does on a realtime update of the node, restores the
|
|
// saved values instead of the ones the form was opened with.
|
|
const defaultValues = computed(() => ({ ...props.service }))
|
|
|
|
const emitServiceChange = (newValues) => {
|
|
emit('values-changed', newValues)
|
|
}
|
|
|
|
const serviceForm = ref(null)
|
|
const isFormValid = (deep) => {
|
|
return serviceForm.value?.isFormValid(deep)
|
|
}
|
|
|
|
return {
|
|
serviceForm,
|
|
isFormValid,
|
|
defaultValues,
|
|
emitServiceChange,
|
|
}
|
|
},
|
|
})
|
|
</script>
|