#840 dropdown no deberia de tener timeout cuando data esté definido
This commit is contained in:
parent
30aab282d6
commit
8119761792
|
@ -26,7 +26,7 @@ export default class DropDown extends Component {
|
||||||
this.showLoadMore = true;
|
this.showLoadMore = true;
|
||||||
this.showFilter = true;
|
this.showFilter = true;
|
||||||
|
|
||||||
this.docKeyDownHandler = (e) => this.onDocKeyDown(e);
|
this.docKeyDownHandler = e => this.onDocKeyDown(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
$postLink() {
|
$postLink() {
|
||||||
|
@ -34,7 +34,7 @@ export default class DropDown extends Component {
|
||||||
this.input = this.element.querySelector('.search input');
|
this.input = this.element.querySelector('.search input');
|
||||||
this.ul = this.element.querySelector('ul');
|
this.ul = this.element.querySelector('ul');
|
||||||
this.list = this.element.querySelector('.list');
|
this.list = this.element.querySelector('.list');
|
||||||
this.list.addEventListener('scroll', (e) => this.onScroll(e));
|
this.list.addEventListener('scroll', e => this.onScroll(e));
|
||||||
}
|
}
|
||||||
|
|
||||||
get shown() {
|
get shown() {
|
||||||
|
@ -66,10 +66,13 @@ export default class DropDown extends Component {
|
||||||
|
|
||||||
if (this.model) {
|
if (this.model) {
|
||||||
this.model.clear();
|
this.model.clear();
|
||||||
|
if (!this.data) {
|
||||||
this.searchTimeout = this.$timeout(() => {
|
this.searchTimeout = this.$timeout(() => {
|
||||||
this.refreshModel();
|
this.refreshModel();
|
||||||
this.searchTimeout = null;
|
this.searchTimeout = null;
|
||||||
}, 350);
|
}, 350);
|
||||||
|
} else
|
||||||
|
this.refreshModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.buildList();
|
this.buildList();
|
||||||
|
|
Loading…
Reference in New Issue