Budibase is an open-source low-code platform for creating internal apps in minutes. Supports PostgreSQL, MySQL, MSSQL, MongoDB, Rest API, Docker, K8s 🚀
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

55 lines
1.1 KiB

<script>
import Field from "./Field.svelte"
import InputDropdown from "./Core/InputDropdown.svelte"
import { createEventDispatcher } from "svelte"
export let inputValue = null
export let dropdownValue = null
export let inputType = "text"
export let label = null
export let labelPosition = "above"
export let placeholder = null
export let disabled = false
export let readonly = false
export let error = null
export let updateOnChange = true
export let quiet = false
export let dataCy
export let autofocus
export let options = []
const dispatch = createEventDispatcher()
const onPick = e => {
dropdownValue = e.detail
dispatch("pick", e.detail)
}
const onChange = e => {
inputValue = e.detail
dispatch("change", e.detail)
}
</script>
<Field {label} {labelPosition} {error}>
<InputDropdown
{dataCy}
{updateOnChange}
{error}
{disabled}
{readonly}
{inputValue}
{dropdownValue}
{placeholder}
{inputType}
{quiet}
{autofocus}
{options}
on:change={onChange}
on:pick={onPick}
on:click
on:input
on:blur
on:focus
on:keyup
/>
</Field>