I'm trying to reset form field values after submitting a form with lightning-record-edit-form but haven't been able to reset the rich text field.
The HTML is this:
<lightning-layout-item padding="horizontal-small">
<!-- review comment field code using commentField -->
<div class="slds-form-element">
<lightning-input-field
field-name={commentField}>
</lightning-input-field
</div>
</lightning-layout-item>
The handleReset function
handleReset() {
const inputFields = this.template.querySelectorAll(
'lightning-input-field'
);
if (inputFields) {
inputFields.forEach(field => {
field.reset();
if (field == 'lightning-input-rich-text') {
field.setRangeText("", 0, input.value.length, "start")
}
});
}
}
The lightning-input-rich-text is within the lightning-input-field but not able to select it with setting a class and call queryselector or with the condition I set in the controller code.