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