Is your feature request related to a problem? Please describe.
I want to have the same overlay scrollbars, with the same settings across my app, without having to take care of instantiating it manually.
Describe the solution you'd like
A deep key (with a boolean value) for the OverlayScrollbar instance options that chooses between adding the data-overlayscrollbars-initialize attribute and the overlayed scrollbars to every child (recursively) of the target element during the instantiation of the instance.
Describe alternatives you've considered
Creating my own Mutation Observer and doing all this process manually.
Additional context
-
An additional attribute data-overlayscrollbars-deep-ignore can be added so that element and its descendents are ignored, in case the user wants to instantiate a different OverlayScrollbars instance with a different set of options from the global one.
-
For frameworks like Vue, a directive could be used instead.
-
An additional option replaceGlobalAPIs to use in conjuction with deep that replace global APIs like window.scrollTo with functions that keep the same APIs intact, but call the scrolling to the global OverlayScrollbars instance would be nice.
Is your feature request related to a problem? Please describe.
I want to have the same overlay scrollbars, with the same settings across my app, without having to take care of instantiating it manually.
Describe the solution you'd like
A
deepkey (with a boolean value) for the OverlayScrollbar instance options that chooses between adding thedata-overlayscrollbars-initializeattribute and the overlayed scrollbars to every child (recursively) of the target element during the instantiation of the instance.Describe alternatives you've considered
Creating my own Mutation Observer and doing all this process manually.
Additional context
An additional attribute
data-overlayscrollbars-deep-ignorecan be added so that element and its descendents are ignored, in case the user wants to instantiate a different OverlayScrollbars instance with a different set of options from the global one.For frameworks like Vue, a directive could be used instead.
An additional option
replaceGlobalAPIsto use in conjuction withdeepthat replace global APIs likewindow.scrollTowith functions that keep the same APIs intact, but call the scrolling to the global OverlayScrollbars instance would be nice.