-
Notifications
You must be signed in to change notification settings - Fork 934
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
Fix for 868 (selectableRowsHeader option) #882
Conversation
Poking around a bit, I noticed this PR is actually very similar to this PR #384, though that one is out of date and has a slightly different implementation. If this PR is accepted, it'd be able to close that one too. |
Looks like this might also address an old PR #384. P. S. I think we commented about this at the same time, as I didn't see your comment on it until now. :p |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just missing one thing, otherwise this looks good.
There are some tests in MUIDataTableHead.test.js
that may need to be modified slightly to take account for the new option. E.g. https://github.com/gregnb/mui-datatables/blob/master/test/MUIDataTableHead.test.js#L127 which will now fail if we don't pass it true
for selectableRowsHeader
in the test, since the default is supplied by MUIDataTable
, but we're using TableHead
component directly.
Also, needs some conflicts to handle the new getDefaultOptions
options function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still seeing a test fail locally. I think we need to change https://github.com/gregnb/mui-datatables/blob/master/test/MUIDataTableHead.test.js#L128 to const options = { selectableRows: 'multiple', selectableRowsHeader: true };
.
Nope, you're good! My local didn't have your latest changes, sorry.
* Added selectableRowsHeader option * fixed for test
Hi @patorjk @gabrielliwerant , how can I hide the checkbox in the header but still show in the rows of data. I just don't want it to be in the header. How can I do that? |
@eminence88th see the selectableRowsHeader option. |
#868
Quick view: https://codesandbox.io/s/github/patorjk/mui-datatables/tree/hide-header-checkbox