We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

rowSelected event not firing in prod mode

Hello,

The rowSelected event of the grid is firing as expected with "ng serve",
but no event is fired when in production mode (ng build --prod). There are no errors in the console.
app.component.ts, app.module.ts and package.json are attached to reproduce the error.
Thanks in advance.


Attachment: tmp_93b50317.zip

3 Replies

MS Madhu Sudhanan P Syncfusion Team October 30, 2018 08:41 AM UTC

Hi Martin, 
 
Thanks for contacting Syncfusion support. 

Query : No event is fired when in production mode (ng build --prod). 
 
We have checked your query and tried to reproduce the issue but it is unsuccessful at our end. From your code, We have prepared a sample in which events are fired in production mode. Please use the command as “npm run startp” to run the sample. Please find the below code and sample link for your reference. 
 
 
If you still facing this same issue, Please import SelectionService module in your app.module.ts file as below. 
 
[app.module.ts] 
import { BrowserModule } from '@angular/platform-browser'; 
import { NgModule } from '@angular/core'; 
import { AppComponent } from './app.component'; 
import { GridModule, SelectionService } from '@syncfusion/ej2-angular-grids'; 
 
@NgModule({ 
  declarations: [AppComponent], 
  imports: [ 
    BrowserModule, GridModule 
  ], 
  providers: [SelectionService], 
  bootstrap: [AppComponent] 
}) 
export class AppModule { } 


Regards, 
Madhu Sudhanan P 



MA Martin October 31, 2018 08:31 AM UTC

Thanks for your response Madhu,
I've forgotten to say that the problem only  occurs in recent versions of angular. De example you sended is angular 5.2 and it works as expected, but it doesn't work in new versions. Thats the reason I attached package.json with the angular version used. I have made some tests and it seems to work in angular 6.2 with SelectionService in app.module providers section, but not without it. And it doesn't work at all in angular 7.
Thank you


MS Madhu Sudhanan P Syncfusion Team November 1, 2018 12:34 PM UTC

Hi Martin, 

We have tried to reproduce the reported problem by using both the Angular 6 and Angular 7 packages in our sample. But the row selected event handler triggers every time when a row is selected. We have attached the sample for your convenience. Please download the sample from the link below, 
 
Please refer the screenshot of the referred angular package in “package.json” file below, 

 

If you are still facing the issue please get back to us with the following details for better assistance. 
 
1.       Share the “dist” folder of your application. 
2.       Please share the report generated using bundle analyzer, please refer the link below, 

The provided information will help us analyze the problem, and provide you a solution as early as possible. 

Regards, 
Madhu Sudhanan P 


Loader.
Live Chat Icon For mobile
Up arrow icon