Skip to content

Commit

Permalink
fix: remove component after copying innerHTML
Browse files Browse the repository at this point in the history
  • Loading branch information
zewa666 committed Sep 25, 2023
1 parent bb5024c commit c4ba24a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/examples/grid-angular.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,10 @@ export class GridAngularComponent implements OnInit {
Object.assign(componentOutput.componentRef.instance, { item: dataContext });

// use a delay to make sure Angular ran at least a full cycle and make sure it finished rendering the Component
setTimeout(() => cellNode.innerHTML = componentOutput.domElement.innerHTML);
setTimeout(() => {
cellNode.innerHTML = componentOutput.domElement.innerHTML;
componentOutput.componentRef.destroy();
});
}
}

Expand Down

0 comments on commit c4ba24a

Please sign in to comment.