|
|
@ -1,4 +1,6 @@ |
|
|
<script> |
|
|
<script> |
|
|
|
|
|
import { Icon } from "@budibase/bbui" |
|
|
|
|
|
import Input from "components/common/Input.svelte" |
|
|
import { store, backendUiStore } from "builderStore" |
|
|
import { store, backendUiStore } from "builderStore" |
|
|
import fetchBindableProperties from "builderStore/fetchBindableProperties" |
|
|
import fetchBindableProperties from "builderStore/fetchBindableProperties" |
|
|
import { DropdownMenu } from "@budibase/bbui" |
|
|
import { DropdownMenu } from "@budibase/bbui" |
|
|
@ -12,13 +14,17 @@ |
|
|
export let props = {} |
|
|
export let props = {} |
|
|
export let onChange = () => {} |
|
|
export let onChange = () => {} |
|
|
|
|
|
|
|
|
|
|
|
let temporaryBindableValue = value |
|
|
|
|
|
|
|
|
|
|
|
function handleClose() { |
|
|
|
|
|
handleChange(key, temporaryBindableValue) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
let bindableProperties |
|
|
let bindableProperties |
|
|
|
|
|
|
|
|
let anchor |
|
|
let anchor |
|
|
let dropdown |
|
|
let dropdown |
|
|
|
|
|
|
|
|
$: console.log() |
|
|
|
|
|
|
|
|
|
|
|
async function getBindableProperties() { |
|
|
async function getBindableProperties() { |
|
|
// Get all bindableProperties |
|
|
// Get all bindableProperties |
|
|
bindableProperties = fetchBindableProperties({ |
|
|
bindableProperties = fetchBindableProperties({ |
|
|
@ -98,14 +104,24 @@ |
|
|
{...props} |
|
|
{...props} |
|
|
name={key} /> |
|
|
name={key} /> |
|
|
</div> |
|
|
</div> |
|
|
<button on:click={dropdown.show}>O</button> |
|
|
{#if control == Input} |
|
|
|
|
|
<button on:click={dropdown.show}> |
|
|
|
|
|
<Icon name="edit" /> |
|
|
|
|
|
</button> |
|
|
|
|
|
{/if} |
|
|
</div> |
|
|
</div> |
|
|
<DropdownMenu bind:this={dropdown} {anchor} align="right"> |
|
|
{#if control == Input} |
|
|
<BindingDropdown |
|
|
<DropdownMenu |
|
|
{...handlevalueKey(value)} |
|
|
on:close={handleClose} |
|
|
on:update={e => handleChange(key, e.detail)} |
|
|
bind:this={dropdown} |
|
|
{bindableProperties} /> |
|
|
{anchor} |
|
|
</DropdownMenu> |
|
|
align="right"> |
|
|
|
|
|
<BindingDropdown |
|
|
|
|
|
{...handlevalueKey(value)} |
|
|
|
|
|
on:update={e => (temporaryBindableValue = e.detail)} |
|
|
|
|
|
{bindableProperties} /> |
|
|
|
|
|
</DropdownMenu> |
|
|
|
|
|
{/if} |
|
|
|
|
|
|
|
|
<style> |
|
|
<style> |
|
|
.property-control { |
|
|
.property-control { |
|
|
@ -139,8 +155,11 @@ |
|
|
position: absolute; |
|
|
position: absolute; |
|
|
background: none; |
|
|
background: none; |
|
|
border: none; |
|
|
border: none; |
|
|
right: 0px; |
|
|
border-radius: 50%; |
|
|
top: 0; |
|
|
height: 24px; |
|
|
bottom: 0; |
|
|
width: 24px; |
|
|
|
|
|
background: rgb(224, 224, 224); |
|
|
|
|
|
right: 5px; |
|
|
|
|
|
--spacing-s: 0; |
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |
|
|
|