You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Product Carousel reordering is not working when I drag and drop products in the editor #2790
Describe the bug
When using the Product Carousel component with Makeswift, manually reordering products in the Makeswift editor does not affect the render order on the storefront. The products always render in the default order returned by the BigCommerce API (usually sorted by ID) rather than the specific order defined in the productIds prop.
To Reproduce
Steps to reproduce the behavior:
Open the Makeswift builder/editor.
Add a Product Carousel component to a page.
Select specific products manually (e.g., Product A (ID: 10), Product B (ID: 5)).
Drag and drop to rearrange them so that Product B (ID: 5) comes before Product A (ID: 10).
Save/Publish and view the component.
Result: The carousel displays Product A first, then Product B (ignoring the manual order).
Previously working?
I don't this so it was ever working as this looks like a miss at start.
Expected behavior
The carousel should display products in the exact order arranged by the user in the Makeswift editor.
Additional context
It appears the component renders the list based directly on the API response order, which defaults to sorting by ID, rather than preserving the order of the product IDs passed from the editor configuration.
Thanks for the issue report @jayeshbharadva! I've opened #2791 to fix the issue. Once it's merged it should be coming out with the next Catalyst release. If you need this fixed ASAP you can apply the changes in the PR to your own codebase. Cheers!
Hey @migueloller . Appreciate your PR I have one more suggestion here if we can pass ids being sorted. So useSWR will cache the results and it will not try to call BC again and again. Just like this.
searchParams.append('ids', additionalProductIds.sort().join(','));
Also just out of curiosity why didn't you used Map here?
@jayeshbharadva, I didn't pay too much mind to the specifics and wanted to get you unblocked quickly. That said, if you want to submit a PR, I'll be happy to review it!
To be clear, though, I do think that keeping the IDs sorted is a great idea 👍🏻
Furthermore, using a Map instead of find is a matter of style and personally I don't have a strong opinion on one over the other. If you want to rework if in a PR, go ahead! As long as it's simple and clean, I'll gladly approve.
Activity
migueloller commentedon Dec 19, 2025
Thanks for the issue report @jayeshbharadva! I've opened #2791 to fix the issue. Once it's merged it should be coming out with the next Catalyst release. If you need this fixed ASAP you can apply the changes in the PR to your own codebase. Cheers!
jayeshbharadva commentedon Dec 19, 2025
Hey @migueloller . Appreciate your PR I have one more suggestion here if we can pass ids being sorted. So useSWR will cache the results and it will not try to call BC again and again. Just like this.
searchParams.append('ids', additionalProductIds.sort().join(','));
Also just out of curiosity why didn't you used Map here?
migueloller commentedon Dec 19, 2025
@jayeshbharadva, I didn't pay too much mind to the specifics and wanted to get you unblocked quickly. That said, if you want to submit a PR, I'll be happy to review it!
migueloller commentedon Dec 19, 2025
To be clear, though, I do think that keeping the IDs sorted is a great idea 👍🏻
Furthermore, using a
Mapinstead offindis a matter of style and personally I don't have a strong opinion on one over the other. If you want to rework if in a PR, go ahead! As long as it's simple and clean, I'll gladly approve.jayeshbharadva commentedon Dec 19, 2025
@migueloller Created PR for now for sorting. For map i agree that will not create a lot difference at this level and will add extra complexity.
jorgemoya commentedon Oct 28, 2026
Fixed in #3313 on
integrations/makeswift. It ships in the next@bigcommerce/catalyst-makeswiftrelease.