budibase/packages/builder/src/components/userInterface/ScreenSelect.svelte

19 lines
518 B
Svelte
Raw Normal View History

<script>
2020-09-14 13:07:08 +02:00
import { DataList } from "@budibase/bbui"
import { createEventDispatcher } from "svelte"
import { store } from "builderStore"
const dispatch = createEventDispatcher()
export let value = ""
const handleBlur = () => dispatch("change", value)
</script>
2020-09-14 13:07:08 +02:00
<DataList editable secondary on:blur={handleBlur} on:change bind:value>
<option value="" />
{#each $store.allScreens as screen}
<option value={screen.route}>{screen.props._instanceName}</option>
{/each}
2020-09-14 13:07:08 +02:00
</DataList>