Open NicolasMahe opened 9 months ago
It seems like the components/Select/Select.tsx
is not working well when the value is an object rather than a string.
https://github.com/liteflow-labs/starter-kit/blob/2f5e3bced16eeda811553b89feba388e9e92001c/components/Select/Select.tsx#L65-L67
The comparaison x.value === value
is not going to work on object or array.
On the explore page or the collection page, when I open the "price range" filter component, a currency is displayed as selected (bold) but when I directly input the min price, I can see the filter is not properly apply. The URL does not contain the currency so the filter is not applied. If I select the currency, then the filter is correctly applied. Also the default selected currency seems to be random, it's not the first one.
https://github.com/liteflow-labs/starter-kit/assets/5823445/18624387-ca4c-4228-a842-7eef9b9a9216
A simple solution could be to add a first item in the select input when currency is not select like "Select a currency". Otherwise find a way to properly select the first currency by default.
As a comparaison, a similar select input on the bid page doesn't have this issue. The first currency displayed is properly and selected as default.