Link datasource dynamic variables table to query
This commit is contained in:
parent
fc719eda27
commit
f499320b47
|
@ -1,6 +1,8 @@
|
|||
<script>
|
||||
import { Body, Table } from "@budibase/bbui"
|
||||
import { onMount } from "svelte"
|
||||
import { queries as queriesStore } from "stores/backend"
|
||||
import { goto } from "@roxi/routify"
|
||||
|
||||
export let datasource
|
||||
export let queries
|
||||
|
@ -13,6 +15,12 @@
|
|||
query: "",
|
||||
}
|
||||
|
||||
const onClick = dynamicVariable => {
|
||||
const queryId = dynamicVariable.queryId
|
||||
queriesStore.select({ _id: queryId })
|
||||
$goto(`./${queryId}`)
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the query name to the dynamic variables
|
||||
*/
|
||||
|
@ -31,6 +39,7 @@
|
|||
</script>
|
||||
|
||||
<Table
|
||||
on:click={({ detail }) => onClick(detail)}
|
||||
schema={dynamicVariableSchema}
|
||||
data={dynamicVariables}
|
||||
allowEditColumns={false}
|
||||
|
|
Loading…
Reference in New Issue