Skip to content

Commit

Permalink
docs(filter-menu): updated example to support radio variant #2386
Browse files Browse the repository at this point in the history
  • Loading branch information
agliga committed Jan 17, 2025
1 parent 33acb1a commit b03a33c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ class {
currentChecked,
}: Parameters<NonNullable<FilterMenuButtonInput["on-change"]>>[0]) {
if (index === undefined) return;
const spreadItems = (this.input as FilterMenuButtonInput).type === "radio" ? {} : this.state.checkedCodes
this.state.checkedCodes = {
...this.state.checkedCodes,
...spreadItems,
[this.state.visibleCountries[index].code]: !!currentChecked,
};
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/ebay-filter-menu/examples/with-search.marko
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ class {
currentChecked,
}: Parameters<NonNullable<FilterMenuInput["on-change"]>>[0]) {
if (index === undefined) return;
const spreadItems = (this.input as FilterMenuInput).type === "radio" ? {} : this.state.checkedCodes
this.state.checkedCodes = {
...this.state.checkedCodes,
...spreadItems,
[this.state.visibleCountries[index].code]: !!currentChecked,
};
}
Expand Down

0 comments on commit b03a33c

Please sign in to comment.