1
0
Fork 0
mirror of synced 2024-07-16 11:45:47 +12:00
budibase/packages/builder/src/components/common/ValuesList.svelte
2020-06-18 17:17:18 +01:00

31 lines
516 B
Svelte

<script>
import { join } from "lodash/fp"
export let values
export let label
const inputChanged = ev => {
try {
values = ev.target.value.split("\n")
} catch (_) {
values = []
}
}
$: valuesText = join("\n")(values)
</script>
<div class="uk-margin">
<label class="uk-form-label">{label}</label>
<div class="uk-form-controls">
<textarea value={valuesText} on:change={inputChanged} />
</div>
</div>
<style>
textarea {
width: 100%;
height: 100px;
}
</style>