Closed ooloth closed 6 years ago
I managed to solve this! I just needed to point the resize call at this.flkty
instead of this
:
componentDidMount = () => {
const resize = this.flkty.resize
this.flkty.resize = () => {
this.flkty.element.classList.remove(`flickity-resize`)
resize.call(this.flkty)
this.flkty.element.classList.add(`flickity-resize`)
}
}
This seems to make the equal height cells hack work with react-flickity-component
.
If anyone knows how this could be implemented in a better way, please let me know!
must been redhat whe need to do somethings somehow!
@pooeske887
If anyone ends up here, I found the hack made by @luksak on this thread https://github.com/metafizzy/flickity/issues/534 seems to work for me where ".carousel-cell" is whatever class you have on the slide cell.
.carousel-cell { display: flex; flex-direction: column; align-items: stretch; min-height: 100%; }
Thanks for creating this component!
I'm trying to implement desandro's equal cell height hack, explained here and shown here.
Here is the hack:
I'm having trouble adapting this code to work with
react-flickity-component
. My attempt (shown below) is partially working, but causes an issue on first load that makes it seems like there is only one cell (the arrows are disabled and the dots don't appear). This behaviour fixes itself as soon as the carousel moves.Can you please show me how to implement desandro's hack with this component?