Add clickoutside handlers to options, long form and relationship cells
This commit is contained in:
parent
46b079497a
commit
5728cf9b2a
|
@ -1,5 +1,6 @@
|
|||
<script>
|
||||
import { onMount, tick } from "svelte"
|
||||
import { clickOutside } from "@budibase/bbui"
|
||||
|
||||
export let value
|
||||
export let focused = false
|
||||
|
@ -60,6 +61,7 @@
|
|||
on:change={handleChange}
|
||||
on:wheel|stopPropagation
|
||||
spellcheck="false"
|
||||
use:clickOutside={close}
|
||||
/>
|
||||
{:else}
|
||||
<div class="long-form-cell" on:click={editable ? open : null} class:editable>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script>
|
||||
import { Icon } from "@budibase/bbui"
|
||||
import { Icon, clickOutside } from "@budibase/bbui"
|
||||
import { getColor } from "../lib/utils"
|
||||
import { onMount } from "svelte"
|
||||
|
||||
|
@ -118,6 +118,7 @@
|
|||
class:invertX
|
||||
class:invertY
|
||||
on:wheel={e => e.stopPropagation()}
|
||||
use:clickOutside={close}
|
||||
>
|
||||
{#each options as option, idx}
|
||||
{@const color = getOptionColor(option)}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<script>
|
||||
import { getColor } from "../lib/utils"
|
||||
import { onMount, getContext } from "svelte"
|
||||
import { Icon, Input, ProgressCircle } from "@budibase/bbui"
|
||||
import { Icon, Input, ProgressCircle, clickOutside } from "@budibase/bbui"
|
||||
import { debounce } from "../../../utils/utils"
|
||||
|
||||
export let value
|
||||
|
@ -284,7 +284,13 @@
|
|||
</div>
|
||||
|
||||
{#if isOpen}
|
||||
<div class="dropdown" class:invertX class:invertY on:wheel|stopPropagation>
|
||||
<div
|
||||
class="dropdown"
|
||||
class:invertX
|
||||
class:invertY
|
||||
on:wheel|stopPropagation
|
||||
use:clickOutside={close}
|
||||
>
|
||||
<div class="search">
|
||||
<Input
|
||||
autofocus
|
||||
|
|
Loading…
Reference in New Issue