Code Monkey home page Code Monkey logo

Comments (6)

maxmarinich avatar maxmarinich commented on June 10, 2024 1

Added at v2.8.0 see https://maxmarinich.github.io/react-alice-carousel/#events

from react-alice-carousel.

maxmarinich avatar maxmarinich commented on June 10, 2024

Hi, @bogdancss! EventType.UPDATE fires when you have changed the activeIndex property (the gallery has been moved programmatically, without using a button action).

If you add/remove elements, you know what you are doing and what happened. Accordingly you can call callback after those actions.

It possible to reopen the issue with feature request label if you don't resolve your case.

from react-alice-carousel.

bogdancss avatar bogdancss commented on June 10, 2024

@maxmarinich I get that, but I need the carousel to trigger an update method to update the isNextSlideDisabled and isPrevSlideDisabled props based on the new number of items

from react-alice-carousel.

bogdancss avatar bogdancss commented on June 10, 2024

@maxmarinich - can you get back to the question above?

from react-alice-carousel.

bogdancss avatar bogdancss commented on June 10, 2024

@maxmarinich we really this this addressed - is there a solution?

from react-alice-carousel.

bogdancss avatar bogdancss commented on June 10, 2024

we have the carousel not render the prev/next buttons when it's not the case to (the number of items fits within the current view)
also, we have the buttons disabled based on isNextSlideDisabled and isPrevSlideDisabled props the carousel provides.

However, the moment the number of items changes so that there are more than the current view fits we want the prev/next buttons to render.
The only way to make the buttons show up after you add an item, is to resize, which in turn triggers the isNextSlideDisabled isPrevSlideDisabled to update.

There should be a way to do this onUpdate and not just onResize or onInit

from react-alice-carousel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.