You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the height prop with a roughly estimated value to prevent all items from loading immediately (since their initial height is 0, as long as the images have not been loaded). once an item has loaded, I'd like to remove the height / set it to auto.
it would be nice if the lib provided an option for this. — in the meantime, what would be the easiest way to achieve this?
The text was updated successfully, but these errors were encountered:
I agree, it would make sense to unset the height prop once the component is visible (and just let the rendered component take up as much space as it needs).
In the meantime, it also works to just set/unset the height via CSS as a workaround. LazyLoad already assigns the required classnames for this (I use JSS syntax):
'.LazyLoad': {
height: 100, // or whatever your estimated height might be
},
'.LazyLoad.is-visible': {
height: 'auto',
},
I'm using the
height
prop with a roughly estimated value to prevent all items from loading immediately (since their initial height is 0, as long as the images have not been loaded). once an item has loaded, I'd like to remove the height / set it toauto
.it would be nice if the lib provided an option for this. — in the meantime, what would be the easiest way to achieve this?
The text was updated successfully, but these errors were encountered: