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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Strange behaviour after updating to 17.x

Thread ID:

Created:

Updated:

Platform:

Replies:

144448 May 7,2019 09:51 AM UTC Jun 11,2019 10:59 AM UTC Angular - EJ 2 2
loading
Tags: Grid
Paul Kocher
Asked On May 7, 2019 09:51 AM UTC

Before the version 17 update I was initially filtering the records on the dataBound event. Like this:

<ejs-grid (dataBound)='initFilter()></ejs-grid>

initFilter() {
console.log('bound');
this.filter(this.filterValue);
}

filter(value: string) {
if (value == 'all') {
this.gridObj.clearFiltering();
}
if (value == 'active') {
this.gridObj.filterByColumn('aktiv', 'equal', 'true');
}
if (value == 'inactive') {
this.gridObj.filterByColumn('aktiv', 'equal', 'false');
}
}

Now with the new update, the dataBound event gets fired at least 4 times and when I click on a button which filters let's say active, it tries to bind the data over and over again.

The data itself comes is sent to the grid through the parent component and gets resolved using the async pipe.

I can't reproduce this issue in a fresh Stackblitz project which I know makes it hard for you to help me but maybe somone has an idea how to deal with intial filtering now.

I tried

this.filterOptions = {
type: 'None',
columns: [{ field: 'aktiv', operator: 'equal', value: this.filter(this.filterByValue), predicate: 'and' }]
};

but that fails.

Thanks in advance

Paul




Hariharan J V [Syncfusion]
Replied On May 10, 2019 08:47 AM UTC

Hi Paul, 
  
We have validated your query. We have logged a bug report for the reported issue as “Invoking clearFiltering inside dataBound results in maximum call stack issue”. Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in end of May.  
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link. 
  
  
We suggest you to use  the  below code snippet, Until the fix included. find the sample link for your reference. 
  
    initFilter() { 
    console.log('bound'); 
    this.filter('inactive'); 
  } 
  filter(value: string) { 
    if (value == 'all' && this.grid.filterSettings.columns.length ) {   //Check the filtered columns length 
      this.grid.clearFiltering(); 
    } 
    if (value == 'active') { 
      this.grid.filterByColumn('CustomerID', 'equal', 'VINET'); 
    } 
    if (value == 'inactive') { 
      this.grid.filterByColumn('OrderID', 'equal', 10248); 
    } 
  } 
  
  
  
If you still faced the issue or if we misunderstood your query, Please get back to us with the following details. 
  
  1. Explain about your requirement
  2. Share the Full Grid code
  
It will help us to provide a better solution as soon as possible. 
  
Regards, 
Hariharan 


Thavasianand Sankaranarayanan [Syncfusion]
Replied On June 11, 2019 10:59 AM UTC

Hi Paul, 
Thanks for your patience. 
 
We are glad to announce that our latest patch release (17.1.50) has been rolled out successfully and in that release, we have added the fix for the issue Invoking clearFiltering inside dataBound results in maximum call stack issue. 
 
Regards, 
Thavasianand S. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon