How to go first page and reload server data?

User want to change page size and reload server data, I try the following code, but that will trigger 2 ajax request.

this.clearAll();
this.config.datafetch = 50;
this.setPage(0);
this.load(this.config.url);

Please help me to do that, thanks!

You can move setPage in after-load callback ( or call it before clearAll ).

this.clearAll(); 
this.config.datafetch = 50;
this.load(this.config.url, function(){
   this.setPage(0); 
});