fix not being redirected to datasource index page once you delete a datasource
This commit is contained in:
parent
fdc1e44896
commit
9d77f084a1
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue