Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom event handlers for components? #27

Open
JohnHKoh opened this issue May 9, 2021 · 0 comments
Open

Add custom event handlers for components? #27

JohnHKoh opened this issue May 9, 2021 · 0 comments

Comments

@JohnHKoh
Copy link

JohnHKoh commented May 9, 2021

Is there a way to add our own customer event handlers for certain components? For instance, I am trying to add a onMouseDown event handler for thumbVertical. I have tried adding the onMouseDown JSX attribute to renderThumbVertical, but it seems like my custom event handler is being overridden by Scrollbars.prototype.handleVerticalThumbMouseDown. Removing this event listener using the Chrome DevTools allows my custom event handler to be called.

I am currently working around this by using the onPointerDown JSX attribute instead, but this is more of a hack and not a solution.

Is there a built-in way to override this behavior, and if not, are there plans to add such a capability in the future? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant