Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
fix(datatable): wait for ready state
Browse files Browse the repository at this point in the history
  • Loading branch information
VMBindraban committed Jun 24, 2016
1 parent 52cb4d7 commit 77bd0aa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/datatable.js
Expand Up @@ -113,12 +113,20 @@ export class DataTable {
} }


searchColumnChanged(newValue, oldValue) { searchColumnChanged(newValue, oldValue) {
if (!this.ready) {
return;
}

delete this.criteria.where[oldValue]; delete this.criteria.where[oldValue];


return this.doSearch(); return this.doSearch();
} }


doSearch() { doSearch() {
if (!this.ready) {
return;
}

if (typeof this.criteria.where[this.searchColumn] === 'object') { if (typeof this.criteria.where[this.searchColumn] === 'object') {
this.criteria.where[this.searchColumn].contains = this.search; this.criteria.where[this.searchColumn].contains = this.search;
} else { } else {
Expand Down

0 comments on commit 77bd0aa

Please sign in to comment.