Skip to content

Commit b205f49

Browse files
fix: country loader controlled (#99)
* bump medusa-react * fix warning
1 parent 7a5e0c8 commit b205f49

File tree

1 file changed

+3
-3
lines changed
  • src/modules/layout/components/country-select

1 file changed

+3
-3
lines changed

src/modules/layout/components/country-select/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const CountrySelect = () => {
4545
<div onMouseEnter={open} onMouseLeave={close}>
4646
<Listbox
4747
onChange={handleChange}
48-
value={
48+
defaultValue={
4949
countryCode
5050
? options?.find((o) => o.country === countryCode)
5151
: undefined
@@ -81,10 +81,10 @@ const CountrySelect = () => {
8181
className="absolute -bottom-[calc(100%-36px)] left-0 xsmall:left-auto xsmall:right-0 max-h-[442px] overflow-y-scroll z-[900] bg-white drop-shadow-md text-small-regular uppercase text-black no-scrollbar"
8282
static
8383
>
84-
{options?.map((o) => {
84+
{options?.map((o, index) => {
8585
return (
8686
<Listbox.Option
87-
key={o.country}
87+
key={index}
8888
value={o}
8989
className="py-2 hover:bg-gray-200 px-3 cursor-pointer flex items-center gap-x-2"
9090
>

0 commit comments

Comments
 (0)