I am trying to overwrite the value of a lightning-input-rich-text field imperatively via a button click. In the code below, line 2 of the javascript file, this.assess_updates_input.value = ''
, causes a Cannot set property 'value' of undefined
error. I have tried other things, such as this.assess_updates_input = ''
, but none have been able to overwrite the field.
How can a lightning-input-rich-text field be overwritten after a user has input a value?
Html
<lightning-input-rich-text
name="assess_updates_input"
value=""
onchange={handleAssessUpdatesChange}
></lightning-input-rich-text>
<lightning-button label="Refresh" variant="brand" onclick={refreshMeetingInfo}>
</lightning-button>
JS
1: refreshMeetingInfo() {
2: this.assess_updates_input.value = '';
3: }