Merge commit

This commit is contained in:
Dean 2023-05-05 09:10:52 +01:00
parent 12ce3291eb
commit e3dadaa22c
1 changed files with 15 additions and 7 deletions

View File

@ -1,5 +1,5 @@
<script>
import { goto, beforeUrlChange } from "@roxi/routify"
import { goto, beforeUrlChange, route, getDirection } from "@roxi/routify"
import {
Icon,
Select,
@ -29,6 +29,11 @@
import { fieldsToSchema, schemaToFields } from "helpers/data/utils"
import AccessLevelSelect from "./AccessLevelSelect.svelte"
// $: lastRoute = $route.last
// $: console.log("lastRoute", lastRoute)
// $: direction = getDirection($route, lastRoute)
// $: console.log("directioon ", direction)
export let query
const transformerDocs = "https://docs.budibase.com/docs/transformers"
@ -46,13 +51,16 @@
$: console.log("GO ", navigateTo)
$: console.log("DISCARD ", discard)
$beforeUrlChange(event => {
$beforeUrlChange((event, route) => {
const updated = JSON.stringify(query)
if (updated !== queryStr && !discard) {
navigateTo = event.url
saveModal.show()
return false
} else return true
console.log("route ", route)
console.log("event ", event)
// if (updated !== queryStr && !discard) {
// navigateTo = event.url
// saveModal.show()
// return false
// } else return true
return true
})
$: datasource = $datasources.list.find(ds => ds._id === query.datasourceId)