-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make country and state a dropdown in shipping info section #88
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. Is it possible to type in the state/country? Just a pet peeve when it's a forced dropdown and not a dropdown or type search.
Next step is to load this from the server via /accounts/get_shipping_info and set it with update_shipping_info
@seveibar you can't type but when you hit a key, the select dropdown does go to the choices starting with that letter.
I added /accounts/get and /accounts/update endpoints for that as shipping info is stored on accounts. What's the benefit of using separate shipping info endpoints? |
@seveibar I end up adding a custom SearchableSelect component. Also, I added some shipping properties to make the fields more conventional as you suggested. I updated the video in the PR description so you can take a look at the updated version. Lmk what you think. |
The design is a bit unconventional, the correct design is like this where you don't have to click the select field: https://react-select.com/home Even better, shadcn has a builtin component here: https://ui.shadcn.com/docs/components/combobox Still this is an improvement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd recommend switching to ComboBox, shadcn's builtin
@seveibar switched to ComboBox and updated the video in the PR description |
@andrii-balitskyi FWIW this is still not correct/best practice. The field itself should be a combobox, the combobox should not appear when you select the field |
Closes #87
Kapture.2024-10-22.at.13.50.31.mp4