Files
Peter Evans 34d9ca3a12 fix: keep the trigger's table when testing a rows trigger node (#7004)
* fix: keep the trigger's table when testing a rows trigger node

* chore: link the trigger table fix changelog entry to its issue
2026-12-02 13:50:20 +00:00

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>