Skip to content

Commit

Permalink
fix(select-chips): fixing problem with filter selection in select
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasMurtaVI committed May 28, 2024
1 parent 75e2e58 commit 5b7c151
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/components/selects/select-chips/select-chips.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@ export class SelectChips {
private get childOptionsEnabled(): HTMLBdsSelectOptionElement[] {
return this.options
? Array.from(
this.el.shadowRoot.querySelectorAll('bds-select-option:not([invisible]):not(#option-add):not(#no-option)'),
)
this.el.shadowRoot.querySelectorAll('bds-select-option:not([invisible]):not(#option-add):not(#no-option)'),
)
: Array.from(this.el.querySelectorAll('bds-select-option:not([invisible]):not(#option-add):not(#no-option)'));
}

Expand Down Expand Up @@ -383,8 +383,7 @@ export class SelectChips {

private async resetFilterOptions() {
for (const option of this.childOptions) {
const optionText = option.querySelector('bds-typo')?.textContent;
if (this.existsChip(optionText, await this.getChips())) {
if (this.existsChip(option.textContent, await this.getChips())) {
option.setAttribute('invisible', 'invisible');
} else {
option.removeAttribute('invisible');
Expand Down Expand Up @@ -759,7 +758,7 @@ export class SelectChips {
if (typeof this.options === 'string') {
try {
internalOptions = JSON.parse(this.options);
} catch (e) {}
} catch (e) { }
} else {
internalOptions = this.options;
}
Expand Down

0 comments on commit 5b7c151

Please sign in to comment.