Posted 1 August 2025, 2:26 am EST
- Updated 1 August 2025, 2:29 am EST
Dear Vivek,
I was able to find out where in my code the error appears.
In one component where I use flexgrid I have a ngOnDestroy method where I call
if(this.flexdata) {
this.flexdata.dispose()
}
when I remove the .dispose() line, that error disappears. Can you tell me more about .dispose()? Is this call even necessary?
The other error appears inside another component where we use Flexgrid. The error appears inside a subscription where we call this.flexdata.refresh(false)
ngAfterViewInit(): void {
this.favoritesSubscription = this.catalogueFavoritesService.catalogueFavorites$.subscribe(favorites => {
this.favoritCatalogues = favorites;
this.cdr.detectChanges();
if (this.flexdata) {
this.flexdata.refresh(false);
}
});
}
I call this.flexdata.refresh() because I display a star icon on the first row cell when the user clicks on “Favor catalogue”. Without this.flexdata.refresh() the star icon is not rendered on the cell. The method inside the subscription gets called every time the user click on a button called “favor catalogue” (where catalogue is a row in the flexgrid). But it also gets called the first the the component is rendered. The error appears in both cases (first load and on every click).
In the compiled main.js the error appears in
l.prototype.finishEditing = function (r) {
return this._edtHdl.finishEditing(r)
},
In this component, we don’t use any edit handler, the whole grid is basically readonly.
Best regards
Moritz