From b03a33c3a4c5850003f8dabca4eb7ad850febba9 Mon Sep 17 00:00:00 2001 From: Andrew Gliga Date: Fri, 17 Jan 2025 08:08:45 -0800 Subject: [PATCH] docs(filter-menu): updated example to support radio variant #2386 --- .../ebay-filter-menu-button/examples/with-search.marko | 3 ++- src/components/ebay-filter-menu/examples/with-search.marko | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/ebay-filter-menu-button/examples/with-search.marko b/src/components/ebay-filter-menu-button/examples/with-search.marko index 68bdd9152..217bbbdc6 100644 --- a/src/components/ebay-filter-menu-button/examples/with-search.marko +++ b/src/components/ebay-filter-menu-button/examples/with-search.marko @@ -25,8 +25,9 @@ class { currentChecked, }: Parameters>[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, }; } diff --git a/src/components/ebay-filter-menu/examples/with-search.marko b/src/components/ebay-filter-menu/examples/with-search.marko index fdda54a7d..84139206d 100644 --- a/src/components/ebay-filter-menu/examples/with-search.marko +++ b/src/components/ebay-filter-menu/examples/with-search.marko @@ -25,8 +25,9 @@ class { currentChecked, }: Parameters>[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, }; }