1
0
Fork 0
mirror of synced 2024-09-08 13:41:09 +12:00

Prevent automatically closing side panels via an outside click when inside the builder

This commit is contained in:
Andrew Kingston 2022-11-22 16:44:35 +00:00
parent 44fdc5efb5
commit c72b7807ca

View file

@ -1,7 +1,7 @@
<script>
import { getContext, setContext } from "svelte"
import { writable } from "svelte/store"
import { Heading, Icon, clickOutside, Checkbox } from "@budibase/bbui"
import { Heading, Icon, clickOutside } from "@budibase/bbui"
import { FieldTypes } from "constants"
import active from "svelte-spa-router/active"
import { RoleUtils } from "@budibase/frontend-core"
@ -72,6 +72,7 @@
$context.device.width,
$context.device.height
)
$: autoCloseSidePanel = !$builderStore.inBuilder && $sidePanelStore.open
// Scroll navigation into view if selected
$: {
@ -250,7 +251,7 @@
<div
id="side-panel-container"
class:open={$sidePanelStore.open}
use:clickOutside={sidePanelStore.actions.close}
use:clickOutside={autoCloseSidePanel ? sidePanelStore.actions.close : null}
class:builder={$builderStore.inBuilder}
>
<div class="side-panel-header">