Open ShiiRochi opened 3 years ago
In this PR I've updated the logic of the scrollport final value processing using the passed scrollContainer prop.
scrollport
scrollContainer
If scrollContainer is a string it will be used in querySelector, but if none corresponding element is found, it will fall back to window.
string
window
If scrollContainer is an instance of an HTMLElement, it will be used as is without any query.
HTMLElement
In other cases, when arrays, numbers, nulls, etc are passed, scrollport will stick to its default value [window].
arrays
numbers
nulls
In this PR I've updated the logic of the
scrollport
final value processing using the passedscrollContainer
prop.If
scrollContainer
is astring
it will be used in querySelector, but if none corresponding element is found, it will fall back towindow
.If
scrollContainer
is an instance of anHTMLElement
, 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
].