Skip to content

Commit 9c6b207

Browse files
committed
chore: set selected option function updated
1 parent 831c66f commit 9c6b207

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,13 +222,11 @@ export class PfSearchInput extends LitElement {
222222
}
223223

224224
/**
225-
* Single select option value for single select menus,
226-
* or array of select option values for multi select.
225+
* Set selected option
227226
*/
228227
@property({ hasChanged: (a, b) => !arraysAreEquivalent(a, b) })
229-
set selected(selected: PfOption | PfOption[]) {
230-
const list = Array.isArray(selected) ? selected : [selected];
231-
this.#combobox.selected = list;
228+
set selected(selected: PfOption) {
229+
this.#combobox.selected = [selected];
232230
}
233231

234232
get selected(): PfOption[] {

0 commit comments

Comments
 (0)