Handle onAdd
This commit is contained in:
parent
3049f7b376
commit
41cb80bde1
|
@ -6,6 +6,7 @@
|
||||||
export let title
|
export let title
|
||||||
export let placeholder
|
export let placeholder
|
||||||
export let value
|
export let value
|
||||||
|
export let onAdd
|
||||||
|
|
||||||
let searchInput
|
let searchInput
|
||||||
let search = false
|
let search = false
|
||||||
|
@ -31,7 +32,7 @@
|
||||||
if (search) {
|
if (search) {
|
||||||
closeSearch()
|
closeSearch()
|
||||||
} else {
|
} else {
|
||||||
alert("todo")
|
onAdd()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -27,10 +27,10 @@
|
||||||
title="Sources"
|
title="Sources"
|
||||||
placeholder="Search for sources"
|
placeholder="Search for sources"
|
||||||
bind:value={searchValue}
|
bind:value={searchValue}
|
||||||
|
onAdd={() => $goto("./new")}
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
<Layout paddingX="L" paddingY="XL" gap="S">
|
<Layout paddingX="L" paddingY="XL" gap="S">
|
||||||
<Button cta on:click={() => $goto("./new")}>Add source</Button>
|
|
||||||
<DatasourceNavigator searchTerm={searchValue} />
|
<DatasourceNavigator searchTerm={searchValue} />
|
||||||
</Layout>
|
</Layout>
|
||||||
</Panel>
|
</Panel>
|
||||||
|
|
Loading…
Reference in New Issue