-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[TableHeaderColumn] onClick not firing #2011
Comments
Same here, I'm not able to use It's a bit strange that |
@kamek-pf Are you using the latest verion of material-ui? |
Turns out, that the |
Yup, it fixed my issue, thanks @oliviertassinari. |
@kamek-pf I'm wondering if this is in the doc. Feel free to submit a PR to enhance if it's not the case. |
I just checked, it's not in the doc. I'll send a PR tonight. |
Done, see #2138. |
The format of the docs has changed considerably, and I'll close this issue, but if you feel anything isn't clear in the new docs, feel free to reopen this issue. |
Hello, any update on how to get onClick to work for TableHeaderColumns? |
It's ongoing in #3812 but I've currently no time to improve QA on the PR, help appreciated until I can work again on it |
I'm also interested in this, I'm not getting click events to work on Ideally, I'd like to sort the table by clicking the TableHeaderColumns, I'm on the latest version of material-ui 0.15.0. Any word on when this update might get in? |
@skbailey, I had the same problem when I was trying sort my table. I found only one solution for this case — <TableHeader>
<TableRow onCellClick={(event) => (console.log(event.target))}>
<TableHeaderColumn>Col 1</TableHeaderColumn>
<TableHeaderColumn>Col 2</TableHeaderColumn>
<TableHeaderColumn>Col 3</TableHeaderColumn>
</TableRow>
</TableHeader> I tryed this solution on Material UI 0.16.1. It worked. :) |
@vyushin you saved my day! |
I'm working on implementing sorting functionality and cannot for the life of me get
onClick
to fire for<TableHeaderColumn>
. I see that there is an onClick prop in the docs, but no luck.This was just for testing purposes, but the third
<TableHeaderColumn>
does nothing when clicked. It also doesn't fire when passed athis.handleClick
or other callback. onCellClick being passed to<Table>
works when clicked on anything other than the header cells. This is using React 0.13.2 and Material-UI 0.11.0.The text was updated successfully, but these errors were encountered: