Closed Thomas-Boi closed 1 year ago
hi @Thomas-Boi, thanks for using this library! I think that's a valid feature request, I'll see what I can do today and yes, this API looks good to me!
onRowClick = function(rowData, event) {}
I'll get back to to you after I have published the beta version of the feature so that you could test it.
hi @Thomas-Boi, I have published 3.7.0-beta.0
and here is the demo: https://codesandbox.io/s/keen-cartwright-9xph1b?file=/src/App.tsx. Feel free to play around and let me know if there are things that are still missing!
If all are good, then I'll merge the PR and publish 3.7.0.
Thanks so much @imballinst for getting this done so quickly! I tested the feature and it works as expected. This would help me a lot with dynamically rendering some components via createPortal
and absolute positing.
One thing I've noticed though: the button onclick
would need to manually call event.stopPropagation
to prevent double event handler. This is fine with me and I'll just leave this comment here as documentations for future users.
Sounds good to me! I'll merge the PR then I'll publish 3.7.0. Thanks for the confirmation!
One thing I've noticed though: the button onclick would need to manually call event.stopPropagation to prevent double event handler. This is fine with me and I'll just leave this comment here as documentations for future users.
Oh yes, that's a good point, I forgot to handle that in the sandbox.
3.7.0 has been published to npm: https://www.npmjs.com/package/react-bs-datatable/v/3.7.0
Hi @imballinst,
I really like your package and find it very useful. I'd like to request one thing though: for the
onRowClick
callback, it'd be great if the Reactevent
object is passed in as a parameter.I need access to the
target
object of a click event and unfortunately, this is not allowing me to do so. I even consider overriding theonRowClick
callback but it seems like passing inonclick
viarowProps
won't achieve what I want.It'd be great if you make the
onRowClick
callback accept aevent
argument. I can even do it myself via a MR if you would like that. However, since it's a small change, I thought perhaps you can add it in to another release.Thank you for your time and I'd like to see this feature soon.