Skip to content

Not able to scroll to dynamically added slides #1099

@kariskarason2

Description

@kariskarason2

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct

Code Sandbox link

No response

Bug report

I am having issues when adding slides dynamically. I add slides in afterSlide if the user has scrolled to the last slide.
The new slides do get added to the carousel, but sliding/using ref.current.goForward() does not work.
My guess is that it has to do with totalPages not updating and so the carousel thinks there isn't a valid page to go to.

Could you advise if there is any way to make this work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions