react-lazyload
react-lazyload copied to clipboard
Updated scrollContainer processing logic
In this PR I've updated the logic of the scrollport final value processing using the passed scrollContainer prop.
If scrollContainer is a string it will be used in querySelector, but if none corresponding element is found, it will fall back to window.
If scrollContainer is an instance of an HTMLElement, it will be used as is without any query.
In other cases, when arrays, numbers, nulls, etc are passed, scrollport will stick to its default value [window].