Describe the bug
rendered and AfterRender output callbacks are not called when Datagrid is initialized
To Reproduce
Expected behavior
afterRender and rendered callbacks would be called once datagrid is rendered
Additional context
Seen in version 4.11.0
see attached Downloads.zip containing html and ts file with reproduction
@pwpatton @tmcconechy - in soho-datagrid the events are hooked up after the data is loaded (esp. if gridData is set).
Moving this block of code after the event hookup code fixes the issue with afterRendered but I am never seeing rendered.
.on('rendered', (e: any, args: SohoDataGridRenderedEvent) => { console.error('rendered'); this.onRendered(args); })
Any ideas when rendered should be called?
It looks like it's called at the end of the init, when again we've not added events. So the event hookup code should go before the widget init call?
@bthharper yes I think so, in most places we seem to hookup events before component init. We should definitely pick one or the other and before the init means we should be able to get the rendered event. Not sure why it's not firing.
Have moved the event hookup code before the init and data method, and it works okay now.
So all good then? I noticed the event is wrongly named afterrender should be afterrendered. To match rendered. But minor..
Would that not need a change in enterprise too?
Yeah that would.. Its covered here for refactoring on a major release. https://github.com/infor-design/enterprise/issues/643 since its breaking (but we could support both so it doesnt). I say leave as is for now.