material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

TableFooter not showing it's descendants correctly if adjustForCheckbox is set to false

Open Serfenia opened this issue 10 years ago • 4 comments

Problem description

TableFooter not showing it's descendants correctly if adjustForCheckbox is set to false.

Steps to reproduce

Create a component that renders a Table, within a TableFooter.

Versions

  • Material-UI: 0.15.1
  • React: 15.1.0
  • Browser: Google Chrome

Code example:

<Table
    selectable={false}
>
    <TableHeader adjustForCheckbox={false} displaySelectAll={false}>
        <TableRow>
              <TableHeaderColumn>
                    Header Column 1
               </TableHeaderColumn>    
        </TableRow>
    </TableHeader>
    <TableBody displayRowCheckbox={false}>
        <TableRow>
              <TableRowColumn>
                    Column 1
               </TableRowColumn>    
        </TableRow>
    </TableBody>
    <TableFooter adjustForCheckbox={false}>
         <TableRow>
             <TableRowColumn>
                 Foobar
             </TableRowColumn>
          </TableRow>
     </TableFooter>
</Table>

Serfenia avatar Jun 28 '16 12:06 Serfenia

@Serfenia adjustForCheckbox is a TableHeader property.

nehalbhanushali avatar Jul 01 '16 22:07 nehalbhanushali

It is not in the documentation, but it is in the propTypes though. And if you set it, the render output is different so, it should work nonetheless in my opinion. The pull request I made fixes it.

On top of that the property should be there otherwise you'd have to style the TableFooter component manually in such away that is has the same effect as the TableHeader

Serfenia avatar Jul 02 '16 10:07 Serfenia

@Serfenia okay !

nehalbhanushali avatar Jul 03 '16 20:07 nehalbhanushali

This bug is already three months as open and has PR with the fix. Can someone to check it and merge it?

fatganz avatar Sep 22 '16 13:09 fatganz