Browse Source

Link datasource dynamic variables table to query

pull/3830/head
Rory Powell 5 years ago
parent
commit
91cce4cb0f
  1. 9
      packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/rest/variables/ViewDynamicVariables.svelte

9
packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/rest/variables/ViewDynamicVariables.svelte

@ -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…
Cancel
Save