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

Table: onRowSelection not invoke after componentClickAway #1272

Closed
raffy2010 opened this issue Jul 28, 2015 · 7 comments
Closed

Table: onRowSelection not invoke after componentClickAway #1272

raffy2010 opened this issue Jul 28, 2015 · 7 comments
Labels
component: table This is the name of the generic UI component, not the React module!

Comments

@raffy2010
Copy link

componentClickAway does invoke setState{ selectedRows: [] }
but not invoke onRowSelection callback?

thanks

@jkruder
Copy link
Contributor

jkruder commented Jul 28, 2015

@raffy2010 What version of mui are you working with?

@raffy2010
Copy link
Author

@jkruder 0.10.1

I have found that there are no change in master yet
https://github.com/callemall/material-ui/blob/master/src/table/table.jsx#L112-L116

@jkruder
Copy link
Contributor

jkruder commented Jul 29, 2015

@raffy2010 Checkout the 0.11 branch. I updated the table to be composable that component has been marked for the 0.11 release. Let me know if that version addresses your concern.

@raffy2010
Copy link
Author

@jkruder
I'm sorry, but branch 0.11 does not solve my problem neither.

https://github.com/callemall/material-ui/blob/v0.11/src/table/table-body.jsx#L72-L74

I think onRowSelection should be call after setState with empty array [], so that I can handle the selectedRow change outer the table component with single onRowSelection callback.
But now, I have to use this.refs.tableComponent.selectedRows to get the selectedRows in the table.

@otroboe
Copy link

otroboe commented Nov 9, 2015

Close this issue ?
#2054

@oliviertassinari
Copy link
Member

@otroboe Yeap.
@raffy2010 A fix was merges to master. We can close this issue. Feel free to reopen it if it's not what you need.

@raffy2010
Copy link
Author

@oliviertassinari
@otroboe
nice job

@zannager zannager added the component: table This is the name of the generic UI component, not the React module! label Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: table This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

5 participants