#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.showFilter = true;
|
||||
|
||||
this.docKeyDownHandler = (e) => this.onDocKeyDown(e);
|
||||
this.docKeyDownHandler = e => this.onDocKeyDown(e);
|
||||
}
|
||||
|
||||
$postLink() {
|
||||
|
@ -34,7 +34,7 @@ export default class DropDown extends Component {
|
|||
this.input = this.element.querySelector('.search input');
|
||||
this.ul = this.element.querySelector('ul');
|
||||
this.list = this.element.querySelector('.list');
|
||||
this.list.addEventListener('scroll', (e) => this.onScroll(e));
|
||||
this.list.addEventListener('scroll', e => this.onScroll(e));
|
||||
}
|
||||
|
||||
get shown() {
|
||||
|
@ -66,10 +66,13 @@ export default class DropDown extends Component {
|
|||
|
||||
if (this.model) {
|
||||
this.model.clear();
|
||||
this.searchTimeout = this.$timeout(() => {
|
||||
if (!this.data) {
|
||||
this.searchTimeout = this.$timeout(() => {
|
||||
this.refreshModel();
|
||||
this.searchTimeout = null;
|
||||
}, 350);
|
||||
} else
|
||||
this.refreshModel();
|
||||
this.searchTimeout = null;
|
||||
}, 350);
|
||||
}
|
||||
|
||||
this.buildList();
|
||||
|
|
Loading…
Reference in New Issue