Uncaught TypeError on sorting and filtering

I am trying to filter and sort my data with backend. However when I try yo type on filter it shows me an error on js console. Same happens if I click the sort button. Please see screenshots below:

Hello,
Could you please send a snippet of your implementation?
Because sorting and filtering work well by default. Here is an example: Code Snippet

It works well in the snippet because I needed to create it with static data. Also it works perfect if I use static data in my local.

However, with dynamic ajax loading it event doesn’t post the filter params to backend.

server side processed data should be in this format:

{
    pos: number, // current position
    total_count: number, // total filtered data count
    data: array // current data page
}

https://docs.webix.com/desktop__plain_dynamic_loading.html

It’s on this format with a ‘parent’ object as well.

{
pos: number, // current position
total_count: number, // total filtered data count
data: array // current data page
parent: number // id of parent
}

It throws the undefined exception on the console before posting to backend. So, I don’t think format is the issue here, because I receive the error on front end before it comes to backend-debug.

Meaning, it comes to onBeforeFilter event, but not onAfterFilter event.

to filter and sort on server side your filter should be “serverFilter” instead of “textFilter”, and sort should be “server” instead of “string”.

Okay guys,

It’s my bad. I didn’t realize that I needed to write for filter content as ‘serverFilter’ rather than ‘textFilter’ which works for static data.

By the way, for those who work with MVC .Net, you need to take filter data on the backend as Dictionary<string,string> filter.