Modify pagechange call which is called by default

edited May 2019 in Technical questions

Hello webix team,
I have datatable with serverside pagenation,i want change parameter "data" value to "false" before page change and want "data = true" initially i.e for first time loadNext method with data as true and then after page change it should be false. But in my case data always appears as "true" which is initial value

snippet:
https://snippet.webix.com/lwzjfuzw

Comments

  • Hello @komals ,

    The point is that onBeforePageChange event relates to the pager, not the datatable. So it needs to remove the event as

     pager:{
         size:10,
         group:4,
        template: "<div class='paging_text'>{common.first()}{common.prev()}Page {common.page()} of #limit#{common.next()}{common.last()}</div>",
        on:{
             "onBeforePageChange":function(){
                data=false;
            }
        }
      }, 
    

    Sample: https://snippet.webix.com/tb42pzxd

  • @Nastja thanks for correcting , but still always "data" as a parameter showing
    "true" even onBeforePageChange event change the value as "false"

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion