function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Avijit GoraiAvijit Gorai 

Lightning datatable dynamic creation-adding onrowselection event issue

I need to build lightning datatable dynamically. I can able to dynamically create and view lightning data table. But as soon as I am adding "onrowselection":component.getReference("c.getSelectedRecord") line, datatable is not rendering. So adding this line is causing the issue, but I need to hookup onrowselection event.
 
Error Reproduce: I have prepared demo code below:
GitHub Link:  https://github.com/forcedotcom/aura/issues/162
Stack Link: https://stackoverflow.com/questions/50116681/salesforce-lightning-datatable-dynamic-creation-adding-onrowselection-event-issu
 
Is that a bug or am I missing some thing? How can I fix it?