data switcher now shows correct tab

This commit is contained in:
Keviin Åberg Kultalahti 2021-03-15 10:26:59 +01:00
parent 13bcde9062
commit 4f0aed0378
2 changed files with 17 additions and 2 deletions

View File

@ -1,5 +1,5 @@
<script>
import { params } from "@sveltech/routify"
import { params, isActive } from "@sveltech/routify"
import { Switcher, Modal } from "@budibase/bbui"
import TableNavigator from "components/backend/TableNavigator/TableNavigator.svelte"
import DatasourceNavigator from "components/backend/DatasourceNavigator/DatasourceNavigator.svelte"
@ -17,7 +17,7 @@
},
]
let tab = $params.selectedDatasource ? "datasource" : "table"
let tab = $isActive('./datasource') || $params.selectedDatasource ? "datasource" : "table"
let modal
</script>

View File

@ -0,0 +1,15 @@
<script>
// import { params } from "@sveltech/routify"
// import { backendUiStore } from "builderStore"
// if ($params.selectedDatasource) {
// const datasource = $backendUiStore.datasources.find(
// m => m._id === $params.selectedDatasource
// )
// if (datasource) {
// backendUiStore.actions.datasources.select(datasource._id)
// }
// }
</script>
<slot />