In datatable, i tried to have rows which are expandables and some none
see : https://codesandbox.io/s/qq6858v6qj
the rows which don't have childs should not have an expand button
the rows with no child have an expand button
| Tech | Version |
|--------------|---------|
| Material-UI | 3.2.2 |
| MUI-datatables | 2.0.0-beta-51 |
| React | 16.4.0 |
| browser | Chrome Version 73.0.3683.103 (Official Build) (64-bit) |
| etc | |
https://github.com/gregnb/mui-datatables/blob/master/src/components/TableSelectCell.js
line 99
have to think about it here
i don't really understand this answer , sorry
So what you are asking is for the ability to have some rows expandable and some not?
yeah, in my datasource i have some master rows, in these rows i can have childs rows or nothing, so yes i can have some rows expandable and some not in the same datatable, that's why i want to hide the expand button when i don't have childs rows , and i'm wondering if it's possible with this actual version of the datatable
So what you are asking is for the ability to have some rows expandable and some not?
Yes, Please
I think having an isRowExpandable option, just like we already have an isRowSelectable option, would be a good way to provide this functionality.
When will this be merged to master?
Probably the release after the next one (so two releases). Could be as soon as a week or two. There are some additional things I wanted to do with expandable rows that I want to bundle in the same release with this one, but I haven't had a chance to work on it yet, as other issues have taken priority.
thank you,
while trying to work with this branch it seems that when isRowExpandable is false, the indication arrow is still visible but only click is disables, am i right?
and can we send also to isRowExpandable: (dataIndex, expandedRows) rowMetadata as well ,so we can make condition such has only if rowMeta has certain info it is expandable.
Most helpful comment
yeah, in my datasource i have some master rows, in these rows i can have childs rows or nothing, so yes i can have some rows expandable and some not in the same datatable, that's why i want to hide the expand button when i don't have childs rows , and i'm wondering if it's possible with this actual version of the datatable