Standardise text area updates

This commit is contained in:
Andrew Kingston 2021-04-16 16:11:11 +01:00
parent 2ab62dc935
commit ac4e0b6986
3 changed files with 2 additions and 12 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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}