-
-
Notifications
You must be signed in to change notification settings - Fork 229
Description
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 withdeep
that replace global APIs likewindow.scrollTo
with functions that keep the same APIs intact, but call the scrolling to the global OverlayScrollbars instance would be nice.