1
0
Fork 0
mirror of synced 2024-10-06 04:54:52 +13:00
budibase/packages/builder/src/common/ValuesList.svelte

35 lines
530 B
Svelte
Raw Normal View History

2019-07-13 21:35:57 +12:00
<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} ></textarea>
</div>
2019-07-13 21:35:57 +12:00
</div>
<style>
textarea {
width:300px;
height:200px;
}
</style>