Skip to content

Commit

Permalink
fix(select): fix divider displaying for single variant (#817)
Browse files Browse the repository at this point in the history
Bug fix for #816 issue

---------

Co-authored-by: semih.ozker <[email protected]>
  • Loading branch information
ozkersemih and semih.ozker authored Mar 26, 2024
1 parent ae0cffd commit 989d1b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/select/bl-select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,9 @@ export default class BlSelect<ValueType extends FormValue = string> extends Form
: "";

const isSearchBarVisible = this.searchBar && this.opened;
const isMultipleWithSelection = this.multiple && this._selectedOptions.length > 0;
const hasSelectedOptions = this._selectedOptions.length > 0;

const isDividerShown = isSearchBarVisible || isMultipleWithSelection;
const isDividerShown = isSearchBarVisible || (hasSelectedOptions && isRemoveButtonShown);

const searchbarPlaceholderText =
this.searchBarPlaceholder ?? msg("Search", { desc: "bl-select: search placeholder text" });
Expand Down

0 comments on commit 989d1b7

Please sign in to comment.