twobin / react-lazyload

Lazy load your component, image or anything matters the performance.
MIT License
5.85k stars 487 forks source link

The new "lazyload-wrapper" container may cause styling issues. #328

Closed ianhu92 closed 3 years ago

ianhu92 commented 3 years ago

During the 2.x version, I set the children height to 100%.

But in 3.x version, there is has no way to set css style to the new "lazyload-wrapper" div directly, the original 100% children expand height to wrappers' height, which is not 100%.

I suggest to support setting style props to the wrapper.

ameerthehacker commented 3 years ago

Hi @ianhu92 thanks for the suggestion, would be great if you can shoot a PR to support this. you can look at this file to get started https://github.com/twobin/react-lazyload/blob/master/src/index.jsx#L339, feel free to let me know if you need any further assistance

ianhu92 commented 3 years ago

Hi @ianhu92 thanks for the suggestion, would be great if you can shoot a PR to support this. you can look at this file to get started https://github.com/twobin/react-lazyload/blob/master/src/index.jsx#L339, feel free to let me know if you need any further assistance

329

Thank you. Please review the PR. Feel free to leave any comments.

ameerthehacker commented 3 years ago

@ianhu92 #329 is has been released(v3.1.0). Feel free to reopen the issue if you face any problems. Once again thanks for the contribution.