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'.