Skip to content

Commit 6cf6705

Browse files
committed
chore: selected suggestion styling removed
1 parent 8d6991e commit 6cf6705

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

elements/pf-search-input/pf-search-input.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@ export class PfSearchInput extends LitElement {
416416
}
417417
this.value = "";
418418
this._toggleInput!.value = this.value;
419+
this.#combobox.selected = [];
419420
}
420421

421422
addOptions(optionData: {
@@ -425,6 +426,8 @@ export class PfSearchInput extends LitElement {
425426
const options: PfOption[] = optionData.map(optionDetail => {
426427
const option: PfOption = document.createElement('pf-option');
427428
option.textContent = `${optionDetail.text}`;
429+
option.value = `${optionDetail.text}`;
430+
option.setAttribute('suggestion', '');
428431
return option;
429432
})
430433
this.append(...options);

elements/pf-select/pf-option.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,11 @@ slot[name="description"] {
7272
margin-inline-end: 0.5em;
7373
}
7474

75+
:host([suggestion]) {
76+
#outer.selected {
77+
background-color: transparent;
78+
}
79+
svg {
80+
display: none;
81+
}
82+
}

0 commit comments

Comments
 (0)