Material-ui: [Table] selectedRows are not reflected in onRowSelection

Created on 12 Jul 2015  路  6Comments  路  Source: mui-org/material-ui


    1. set selectable, multiSelectable and canSelectAll to true


    1. click select all


    1. onRowSelection is not fired


    1. choose one row and click on its checkbox


    1. the checkbox is deselected, but the row is still in highlight, and onRowSelection is fired for this row

Also:


    1. set selectable, multiSelectable and canSelectAll to true


    1. select one row, then shift select more rows below this row


    1. onRowSelection gives an index and an Object


    1. then press a row between the shift-selected rows, the row cannot be deselected and the results from onRowSelection are wrong

bug 馃悰

Most helpful comment

@tintin1343 This issue is still persisting in v0.15.0 can you reopen this issue?

All 6 comments

@jackytck Thanks for the feedback. I'm currently working #1088 and have addressed the select all issues. I am also working on fixing the SHIFT clicking and onRowSelection event firing. Right now, when all rows have been selected I'm considering returning having onRowSelection fire with true or all. I do not want to attempt to populate a full list of the row indexes. For other scenarios, the onRowSelection will return a list of all of the selected row indexes instead of objects which represent ranges.

I think that is better that if all row as selected the onRowSelection return the full list of element of the list, if i am working with a dinamic table and not sure of what element are in i will prefer to have a list of all elements.
PD: sorry for my english

@valinol The new version of the table will only return index values as it does not know what the content is (and shouldn't care). You should have the model somewhere in your app. If you're not sure how this might work, consider looking at flux/reflux. There are lot of flux like patterns out there.

@jackytck we had a few PRs addressing this / similar issues with the Table component. Can you test this again and let us know?

Closing this for lack of response from the OP. If the issue is still not addressed feel free to leave a comment below and we will open the issue up for you.

@tintin1343 This issue is still persisting in v0.15.0 can you reopen this issue?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iamzhouyi picture iamzhouyi  路  3Comments

ghost picture ghost  路  3Comments

pola88 picture pola88  路  3Comments

ghost picture ghost  路  3Comments

rbozan picture rbozan  路  3Comments