Giter VIP home page Giter VIP logo

Comments (8)

howells avatar howells commented on June 15, 2024 1

@nullhook strange one - I had already removed static but it made no difference, but now I've added in a setTimeout it works: hacky but I can't get it to work any other way. Thanks for the suggestion.

from react-flickity-component.

nullhook avatar nullhook commented on June 15, 2024

Are you using NextJS?

from react-flickity-component.

howells avatar howells commented on June 15, 2024

@nullhook yes... what do you reckon is up? SSR issue?

from react-flickity-component.

nullhook avatar nullhook commented on June 15, 2024

It should work if you remove the static prop from the Flickty component.

When you add static prop, it renders the children inside Portal.

P.S - If you want to keep the static prop, delay the focus, it should work. However, I feel adding a setTimeout feels hacky.

from react-flickity-component.

nullhook avatar nullhook commented on June 15, 2024

Do you have reloadOnUpdate prop as true?

from react-flickity-component.

howells avatar howells commented on June 15, 2024

No, these are my props:

<Flickity
            className="EntryHeroSlideshow__cells"
            options={flickityOptions}
            disableImagesLoaded
            flickityRef={c => (flickity.current = c)}
          >

and flickityOptions:

 const flickityOptions = {
    setGallerySize: false,
    prevNextButtons: false,
    lazyLoad: 2,
    pageDots: false,
    autoPlay: duration,
    wrapAround: true,
    pauseAutoPlayOnHover: false,
  };

from react-flickity-component.

nullhook avatar nullhook commented on June 15, 2024

Try removing the disableImagesLoaded prop and see if it works.

Are you using that prop for something?

from react-flickity-component.

nullhook avatar nullhook commented on June 15, 2024

Nvm, removing static prop raises other issues such as routing to dynamic pages in NextJS.

from react-flickity-component.

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.