iron-scroll-threshold
iron-scroll-threshold copied to clipboard
on-lower-threshold gets triggered even at page load.
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