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

setCellProps changed following V3 update #1414

Closed
Eithcowich opened this issue Jul 15, 2020 · 2 comments
Closed

setCellProps changed following V3 update #1414

Eithcowich opened this issue Jul 15, 2020 · 2 comments
Labels

Comments

@Eithcowich
Copy link

I'm setting a cell's border by calling setCellProps in the column's options. This is the code:

setCellProps: (value) => { return { className: classnames ({ [classes.BorderCell]: value !== undefined, }) }}

BorderCell is simple CSS:

BorderCell: {
    borderRight: '1px solid gray',
},

In V2 it looked like this:

Screen Shot 2020-07-15 at 11 45 57 AM

Now it V3 there's a border both for the cell and for the text in it:

Screen Shot 2020-07-15 at 11 47 17 AM

What's the new way of doing it?

@patorjk patorjk added the bug label Jul 15, 2020
@patorjk
Copy link
Collaborator

patorjk commented Jul 15, 2020

Looks like this is a bug, the props get spread on the inner cell as well as the table cell: https://github.com/gregnb/mui-datatables/blob/master/src/components/TableBodyCell.js#L136

I'll get a fix into the 3.2.0 release, which should either happen tonight or tomorrow (more info here: #1404)

@patorjk
Copy link
Collaborator

patorjk commented Jul 16, 2020

Try with the new 3.2.0 version, this issue should be resolved there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants