react-lazyload icon indicating copy to clipboard operation
react-lazyload copied to clipboard

Updated scrollContainer processing logic

Open ShiiRochi opened this issue 4 years ago • 0 comments

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].

ShiiRochi avatar Jan 15 '21 16:01 ShiiRochi