Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I did a react component to wrap gemini-scrollbar, however, becauses gemini-scrollbar inyects HTMLElements at runtime modifying the nodes structure, when the react-component did update, the contents will be all messed up. This is because gemini-scrollbar was infering with React (Virtual) DOM. To fix this, I added a new config-option `createElements` (default => true), this option tells gemini-scrollbar if it needs to create and inyect the elements at runtime, or if it should search for them on the `element` container instead. Passing this option as false, will assume that you to have added the required markup with the specific css-classes on them to the lib to work. Example markup: ``` <div class="something-scrollable"> <!-- required markup --> <div class="gm-scrollbar -vertical"> <div class="thumb"></div> </div> <div class="gm-scrollbar -horizontal"> <div class="thumb"></div> </div> <div class="gm-scroll-view"> All your content here. </div> <!-- required markup --> </div> <script> new GeminiScrollbar({ element : document.querySelector('.something-scrollable'), createElements : false }).create(); </script> ```
- Loading branch information