Skip to content
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

Shipment component loading forever when autoSelectSingleShippingMethod is used #491

Open
AsafeToschi opened this issue Feb 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@AsafeToschi
Copy link

AsafeToschi commented Feb 26, 2024

Describe the bug

If you try to use the <Shipment /> component with the autoSelectSingleShippingMethod property it won't finish loading

The cause seems to be the the loader state that never is set to false when we enter this if statement below:

image
File: commercelayer-react-components/packages/react-components/src/components/shipments/Shipment.tsx

It looks like everything else is working as you refresh the page the component will load.

To Reproduce

  1. Let only one shipping method available on Commerce Layer.
  2. Open a incognito window that implements the <Shipment /> component with the autoSelectSingleShippingMethod property set to true
  3. Wait a few seconds to verify if the ShippingMethod options will load.

Note: For every test close every incognito windows opened and open a new one to always get this first load that never ends.

@AsafeToschi AsafeToschi added the bug Something isn't working label Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant