Disable refresh of integrations on reload
This commit is contained in:
parent
d9514dd519
commit
6b13f95322
|
|
@ -55,7 +55,7 @@ let interval = null
|
|||
|
||||
onMounted(() => {
|
||||
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)
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -36,9 +36,11 @@ export const useFormIntegrationsStore = defineStore("form_integrations", () => {
|
|||
return groupedObject
|
||||
})
|
||||
|
||||
const fetchFormIntegrations = (formId) => {
|
||||
contentStore.resetState()
|
||||
contentStore.startLoading()
|
||||
const fetchFormIntegrations = (formId, refresh=true) => {
|
||||
if (refresh) {
|
||||
contentStore.resetState()
|
||||
contentStore.startLoading()
|
||||
}
|
||||
return useOpnApi(formIntegrationsEndpoint.replace("{formid}", formId)).then(
|
||||
(response) => {
|
||||
contentStore.save(response.data.value)
|
||||
|
|
|
|||
Loading…
Reference in New Issue