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

Enhancement: allow overriding of DataSheet events (onMouseOver, etc.) #36

Closed
kylegoetz opened this issue Sep 28, 2017 · 0 comments
Closed

Comments

@kylegoetz
Copy link
Contributor

I want to be able to override DataSheet events but don't see a way to do this currently. In particular, I want to disable the default behavior for when you click and drag across multiple cells (basically I want to have it just highlight the cell you clicked and that's it: I have the grid in a draggable div and the two drags conflict with one another).

In the constructor for DataSheet it's as easy as _this.onMouseOver = (_this.props.onMouseOver || _this.onMouseOver).bind(this) for instance, and then if you do <ReactDataSheet onMouseOver={myFunction}/> then whatever myFunction is will override the default behavior.

I think I'm going to go ahead and implement this in my fork soon because it's something I need for a project I'm working on. I'll create a PR from there and if this isn't a desired feature or my implementation sucks, feel free to reject the PR or suggest a different approach and I might have time to do that myself.

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

2 participants