Skip to content

Product Carousel reordering is not working when I drag and drop products in the editor #2790

Closed

Description

@jayeshbharadva

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:

  1. Open the Makeswift builder/editor.
  2. Add a Product Carousel component to a page.
  3. Select specific products manually (e.g., Product A (ID: 10), Product B (ID: 5)).
  4. Drag and drop to rearrange them so that Product B (ID: 5) comes before Product A (ID: 10).
  5. 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.

Evidence
Vimeo Link

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.

Activity

  1. migueloller commented on Dec 19, 2025

    @migueloller
    Contributor

    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!

  2. self-assigned this
    on Dec 19, 2025
  3. jayeshbharadva commented on Dec 19, 2025

    @jayeshbharadva
    Author

    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?

  4. migueloller commented on Dec 19, 2025

    @migueloller
    Contributor

    @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!

  5. migueloller commented on Dec 19, 2025

    @migueloller
    Contributor

    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.

  6. jayeshbharadva commented on Dec 19, 2025

    @jayeshbharadva
    Author

    @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.

  7. jorgemoya commented on Oct 28, 2026

    @jorgemoya
    Contributor

    Fixed in #3313 on integrations/makeswift. It ships in the next @bigcommerce/catalyst-makeswift release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions