Sitecore / jss

Software development kit for JavaScript developers building web applications with Sitecore Experience Platform
https://jss.sitecore.com
Apache License 2.0
261 stars 275 forks source link

scRichText does not clear text when change to empty string #1295

Closed rainlake closed 21 hours ago

rainlake commented 1 year ago

according to this line https://github.com/Sitecore/jss/blob/27db6b3f982e9277f0b0c4947ea4ca638557e072/packages/sitecore-jss-angular/src/components/rich-text.directive.ts#L45

scRichText directive does not seem to clear text when changed from text to empty.

illiakovalenko commented 1 year ago

@rainlake Thank you for your report. Can I ask you, please, to provide a detailed scenario on how to reproduce this issue? You can try to test using our angular sample, and provide steps based on that. After that, we will get back and review it again

eclipticrick commented 1 year ago
import { OnInit } from '@angular/core';

@Component({
  selector: 'wl-goat-component',
  template: '<div *scRichText="{ value: richTextValue }"></div>',
})
export class GoatComponent implements OnInit {
  richTextValue = 'Goat';

  ngOnInit() {
    setTimeout(() => {
      this.richTextValue = '';
    }, 5000);
  }
}
illiakovalenko commented 1 year ago

@eclipticrick Thanks for the details! I will add it to our inbox for the further investigation

stale[bot] commented 1 month ago

This has been automatically marked as stale because it has not had recent activity. It will be closed if there is no further activity within 30 days. You may add comments or the 'keep' label to prevent it from closing. Thank you for your contributions.