Skip to content

Commit b03a33c

Browse files
committed
docs(filter-menu): updated example to support radio variant #2386
1 parent 33acb1a commit b03a33c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/components/ebay-filter-menu-button/examples/with-search.marko

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ class {
2525
currentChecked,
2626
}: Parameters<NonNullable<FilterMenuButtonInput["on-change"]>>[0]) {
2727
if (index === undefined) return;
28+
const spreadItems = (this.input as FilterMenuButtonInput).type === "radio" ? {} : this.state.checkedCodes
2829
this.state.checkedCodes = {
29-
...this.state.checkedCodes,
30+
...spreadItems,
3031
[this.state.visibleCountries[index].code]: !!currentChecked,
3132
};
3233
}

src/components/ebay-filter-menu/examples/with-search.marko

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ class {
2525
currentChecked,
2626
}: Parameters<NonNullable<FilterMenuInput["on-change"]>>[0]) {
2727
if (index === undefined) return;
28+
const spreadItems = (this.input as FilterMenuInput).type === "radio" ? {} : this.state.checkedCodes
2829
this.state.checkedCodes = {
29-
...this.state.checkedCodes,
30+
...spreadItems,
3031
[this.state.visibleCountries[index].code]: !!currentChecked,
3132
};
3233
}

0 commit comments

Comments
 (0)