Skip to content

Commit

Permalink
fix(select): select check additional count event loop (#743)
Browse files Browse the repository at this point in the history
Fixes select causing the window to be frozen on choosing x amount of
options. This is caused by running `_checkAdditionalItemCount` within
updated for each update instead of listening for selected options only.

Co-authored-by: Aykut Saraç <aykut.sarac@trendyol.com>
  • Loading branch information
AykutSarac and Aykut Saraç authored Nov 23, 2023
1 parent fd32b93 commit 43d6b0d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/select/bl-select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,9 @@ export default class BlSelect<ValueType extends FormValue = string> extends Form
this.value = null;
}

this._checkAdditionalItemCount();
if (_changedProperties.has("_selectedOptions")) {
this._checkAdditionalItemCount();
}
}

/**
Expand Down

0 comments on commit 43d6b0d

Please sign in to comment.