list onAfterScroll question

hi,

i am using onAfterScroll list event to do partial loads of data. the point is that i do not want to load when the user scrolls from down-up. Just up-down.
How can i filter this?

Thanks and regards!

pos object given as a paramer seems to be undefined

the point is that i do not want to call server to load data serveral times for same ids. Calls are repeating.

Thanks and regards!

i solved it with an array ant checking if the id from loading does not exists in that array.

Thanks and regards!

i thought it was solved but my problem is still there. How can i solve this?

Pos parameter is undefined.

Thanks and regards!

Any help please! I’m in a hurry.

How can i disable scroll from down-up when onAfterScroll list event fires?

Thanks and regards!

You can store the max scroll position, and call data loading only when new scrolling position is more than the previous one

      onAfterScroll:function(){
        var prev = this.$maxScroll || 0;
        var top = this.getScrollState().y;
        if (top > prev){
          this.$maxScroll = top;
          webix.message("Scroll down");
        }
      }

http://webix.com/snippet/2983a34f

Thank you very very much maksim!

regards!