Disable refresh of integrations on reload
This commit is contained in:
parent
d9514dd519
commit
6b13f95322
|
|
@ -55,7 +55,7 @@ let interval = null
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (!props.integration.data || props.integration.data.length === 0) {
|
if (!props.integration.data || props.integration.data.length === 0) {
|
||||||
interval = setInterval(() => formIntegrationsStore.fetchFormIntegrations(props.form.id), 3000)
|
interval = setInterval(() => formIntegrationsStore.fetchFormIntegrations(props.form.id, false), 3000)
|
||||||
setTimeout(() => { clearInterval(interval) }, 30000)
|
setTimeout(() => { clearInterval(interval) }, 30000)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,11 @@ export const useFormIntegrationsStore = defineStore("form_integrations", () => {
|
||||||
return groupedObject
|
return groupedObject
|
||||||
})
|
})
|
||||||
|
|
||||||
const fetchFormIntegrations = (formId) => {
|
const fetchFormIntegrations = (formId, refresh=true) => {
|
||||||
|
if (refresh) {
|
||||||
contentStore.resetState()
|
contentStore.resetState()
|
||||||
contentStore.startLoading()
|
contentStore.startLoading()
|
||||||
|
}
|
||||||
return useOpnApi(formIntegrationsEndpoint.replace("{formid}", formId)).then(
|
return useOpnApi(formIntegrationsEndpoint.replace("{formid}", formId)).then(
|
||||||
(response) => {
|
(response) => {
|
||||||
contentStore.save(response.data.value)
|
contentStore.save(response.data.value)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue