-
-
Couldn't load subscription status.
- Fork 2.1k
Description
I am having an issue where the adaptiveHeight setting is not re-calculating the height on a Slider when there are two Sliders on the page.
Here is codeSandBox that duplicates the issue but only sometimes and when the connection is slow enough: https://codesandbox.io/s/k27p314y6o .
Locally the issue does not happen if I only have one Slider. The Slide height is re-calculated properly once the image finishes loading. However when a second Slider is added without images, and it is added higher on the page than the slider with adaptiveHeight={true}, then the adaptiveHeight setting does not re-calculate the height of the Slider with the image (the Lower Slider on the page). This leaves much of the slide not visible as it extends outside the carousel
NOTE: I have looked into this some and have noticed that the adaptHeight() function is called when the image finishes loading but it is called on the wrong slider ( the first Slider on the page without the image).