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

dataStateChange event signature is different than in your documentation

Thread ID:

Created:

Updated:

Platform:

Replies:

146356 Aug 1,2019 08:15 AM UTC Aug 5,2019 09:05 AM UTC React - EJ 2 3
loading
Tags: Grid
Drasko Popovic
Asked On August 1, 2019 08:15 AM UTC

Hi,
we're trying to create custom binding for the grid based on your documentation and we have problems.
We're using typescript and version of ej2 17.2.39.

We're following this documentation page: https://ej2.syncfusion.com/react/documentation/grid/data-binding/#custom-binding

Typescript won't compile because dataStateChange signature is different then in your documentation

public dataStateChange(state : DataStateChangeEventArgs) {
      this.orderService.execute(state).then(( gridData ) => {
          if(this.grid) {
            this.grid.dataSource = gridData
          }
        });
    }
This is the error:
Types of property 'dataStateChange' are incompatible.
  Type '(state: DataStateChangeEventArgs) => void' is not assignable to type 'EmitType<DataStateChangeEventArgs>'.
    Type '(state: DataStateChangeEventArgs) => void' is not assignable to type '(arg?: DataStateChangeEventArgs | undefined, ...rest: any[]) => void'.
      Types of parameters 'state' and 'arg' are incompatible.
        Type 'DataStateChangeEventArgs | undefined' is not assignable to type 'DataStateChangeEventArgs'.
          Type 'undefined' is not assignable to type 'DataStateChangeEventArgs'.

Seeni Sakthi Kumar Seeni Raj [Syncfusion]
Replied On August 2, 2019 10:54 AM UTC

Hi Drasko, 

Greetings from Syncfusion.  

We are unable to reproduce the problem at our end. We have prepared a sample with the latest version 17.2.39 and it is working fine. Refer to the following demo.  


Please confirm your version details and also share your component page. 

Regards,  
Seeni Sakthi Kumar S. 


Drasko Popovic
Replied On August 2, 2019 01:33 PM UTC

Thanks Seeni,
your example helped. Problem was that we were using typescript 3.5.3. Once we downgraded the typescript to as in your example 3.3.3 it started to work.

Should we avoid using typescript greteer then 3.3.3?

Seeni Sakthi Kumar Seeni Raj [Syncfusion]
Replied On August 5, 2019 09:05 AM UTC

Hi Drasko,  

Greetings from Syncfusion.  

We have checked with the typescript version 3.5.3 and it is working fine at our end. Refer to the following sample demo.  


We suspect that you are using the older version of the Syncfusion Packages. Please check the package.json was given the ej2-react-grids with the v17.2.39 and ensure other related packages also.  

Regards,  
Seeni Sakthi Kumar 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