From dd1b8655a5e7b58ce0c94fe804b279498095fba3 Mon Sep 17 00:00:00 2001 From: Daniel Herrero Date: Tue, 9 Jan 2018 14:21:17 +0100 Subject: [PATCH] dropDown error corregido cuando el servidor tarda en responder --- client/core/src/drop-down/drop-down.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/client/core/src/drop-down/drop-down.js b/client/core/src/drop-down/drop-down.js index deaea7743..292165ad5 100644 --- a/client/core/src/drop-down/drop-down.js +++ b/client/core/src/drop-down/drop-down.js @@ -86,9 +86,17 @@ export default class DropDown { }); } - _eventScroll(add) { + _eventScroll(add, num) { + let count = num || 0; if (add) { - this.container.addEventListener('scroll', e => this.loadFromScroll(e)); + if (this.container) + this.container.addEventListener('scroll', e => this.loadFromScroll(e)); + else if (count < 4) { + count++; + this.$timeout(() => { // wait angular ngIf + this._eventScroll(add, count); + }, 250); + } } else { this.container.removeEventListener('scroll', e => this.loadFromScroll(e)); }