Standardise text area updates
This commit is contained in:
parent
2ab62dc935
commit
ac4e0b6986
|
@ -7,7 +7,6 @@
|
|||
export let disabled = false
|
||||
export let error = null
|
||||
export let id = null
|
||||
export let updateOnChange = true
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
|
@ -33,8 +32,7 @@
|
|||
class="spectrum-Textfield-input"
|
||||
{disabled}
|
||||
{id}
|
||||
on:blur={onChange}
|
||||
on:change={updateOnChange ? onChange : null}>{value || ''}</textarea>
|
||||
on:blur={onChange}>{value || ''}</textarea>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
export let placeholder = null
|
||||
export let disabled = false
|
||||
export let error = null
|
||||
export let updateOnChange = true
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
const onChange = e => {
|
||||
|
@ -19,11 +18,5 @@
|
|||
</script>
|
||||
|
||||
<Field {label} {labelPosition} {disabled} {error}>
|
||||
<TextArea
|
||||
{error}
|
||||
{disabled}
|
||||
{value}
|
||||
{placeholder}
|
||||
{updateOnChange}
|
||||
on:change={onChange} />
|
||||
<TextArea {error} {disabled} {value} {placeholder} on:change={onChange} />
|
||||
</Field>
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
<CoreTextArea
|
||||
value={$fieldState.value}
|
||||
on:change={e => fieldApi.setValue(e.detail)}
|
||||
updateOnChange={false}
|
||||
disabled={$fieldState.disabled}
|
||||
error={$fieldState.error}
|
||||
id={$fieldState.fieldId}
|
||||
|
|
Loading…
Reference in New Issue