Skip to content

Commit

Permalink
Wrap updateFilterWidth in setTimeout to prevent changed-after-checked…
Browse files Browse the repository at this point in the history
… error when using a placeholder (Fix #208).
  • Loading branch information
Bastiaan van den Berg committed Sep 20, 2017
1 parent f720d59 commit 6f5c202
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/select.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,9 @@ export class SelectComponent implements ControlValueAccessor, OnChanges, OnInit

private updateState() {
this.placeholderView = this.optionList.hasSelected ? '' : this.placeholder;
this.updateFilterWidth();
setTimeout(() => {
this.updateFilterWidth();
});
}

/** Select. **/
Expand Down

0 comments on commit 6f5c202

Please sign in to comment.