Grsmto / Grsmto/simplebar

Disable Auto init from DOM

Open
#653 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
6.4k
Forks
527
PR merge metrics
No merged PRs in 30d

Description

I'm mainly using simplebar-react, but in one specific case I also have to initialize simplebar via vanila JS package.

Before extracting simplebar-core as separate everything was working fine because of SimpleBar.instances check. But right now I'm getting 2 scrollbars instead of 1.

So, is it possible to add an option to disable auto init from DOM elements? or disable MutationObserver after initialization?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the SimpleBar.instances check and the MutationObserver behavior in simplebar-core, focusing on how simplebar-react and the vanilla JavaScript package initialize the same DOM element. Clarify whether the requested option should prevent automatic DOM initialization or disable observation after initialization; done means one scrollbar is created without breaking normal automatic initialization.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.