iron-scroll-threshold icon indicating copy to clipboard operation
iron-scroll-threshold copied to clipboard

on-lower-threshold gets triggered even at page load.

Open madhur29shah87 opened this issue 6 years ago • 0 comments

Description

on-lower-threshold triggers a function call even at page load

Expected outcome

This function should get called only at lower-threshold value.

Actual outcome

Function gets called when lower-threshold is reached, But also gets triggered when page loads.

Code snippet

<iron-scroll-threshold id="threshold" lower-threshold="10" on-lower-threshold="_loadMoreData">

_loadMoreData() {
          setTimeout(
            function () {
                   // some logic
                  // I want this iron ajax to be called only when threshold is reached. And not every time when page loads
                  this.$.ironAjax.generateRequest();
                
            }.bind(this),500);
          this.$.threshold.clearTriggers();
        }

Browsers Affected

  • [x] Chrome
  • [ ] Firefox
  • [ ] Safari 9
  • [ ] Safari 8
  • [ ] Safari 7
  • [ ] Edge
  • [ ] IE 11
  • [ ] IE 10

madhur29shah87 avatar Aug 07 '18 08:08 madhur29shah87