fix not being redirected to datasource index page once you delete a datasource

This commit is contained in:
Keviin Åberg Kultalahti 2021-03-18 10:56:18 +01:00
parent 62e6e21bc4
commit a9a895995b
1 changed files with 4 additions and 5 deletions

View File

@ -1,7 +1,8 @@
<script> <script>
import { backendUiStore, store, allScreens } from "builderStore" import { goto } from "@sveltech/routify"
import { backendUiStore } from "builderStore"
import { notifier } from "builderStore/store/notifications" import { notifier } from "builderStore/store/notifications"
import { DropdownMenu, Button, Input } from "@budibase/bbui" import { DropdownMenu } from "@budibase/bbui"
import ConfirmDialog from "components/common/ConfirmDialog.svelte" import ConfirmDialog from "components/common/ConfirmDialog.svelte"
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns" import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
@ -10,9 +11,6 @@
let anchor let anchor
let dropdown let dropdown
let confirmDeleteDialog let confirmDeleteDialog
let error = ""
let originalName = datasource.name
let willBeDeleted
function hideEditor() { function hideEditor() {
dropdown?.hide() dropdown?.hide()
@ -26,6 +24,7 @@
async function deleteDatasource() { async function deleteDatasource() {
await backendUiStore.actions.datasources.delete(datasource) await backendUiStore.actions.datasources.delete(datasource)
notifier.success("Datasource deleted") notifier.success("Datasource deleted")
$goto('./datasource')
hideEditor() hideEditor()
} }
</script> </script>