Fix issue with navigation links editor mutating real component structure
This commit is contained in:
parent
0da0002bc5
commit
785ff45240
|
@ -2,13 +2,15 @@
|
||||||
import { Button, ActionButton, Drawer } from "@budibase/bbui"
|
import { Button, ActionButton, Drawer } from "@budibase/bbui"
|
||||||
import { createEventDispatcher } from "svelte"
|
import { createEventDispatcher } from "svelte"
|
||||||
import NavigationDrawer from "./NavigationDrawer.svelte"
|
import NavigationDrawer from "./NavigationDrawer.svelte"
|
||||||
|
import { cloneDeep } from "lodash/fp"
|
||||||
|
|
||||||
export let value = []
|
export let value = []
|
||||||
let drawer
|
let drawer
|
||||||
|
let links = cloneDeep(value)
|
||||||
|
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
const save = () => {
|
const save = () => {
|
||||||
dispatch("change", value)
|
dispatch("change", links)
|
||||||
drawer.hide()
|
drawer.hide()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -19,5 +21,5 @@
|
||||||
Configure the links in your navigation bar.
|
Configure the links in your navigation bar.
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
<Button cta slot="buttons" on:click={save}>Save</Button>
|
<Button cta slot="buttons" on:click={save}>Save</Button>
|
||||||
<NavigationDrawer slot="body" bind:links={value} />
|
<NavigationDrawer slot="body" bind:links />
|
||||||
</Drawer>
|
</Drawer>
|
||||||
|
|
Loading…
Reference in New Issue