Files
bigcapital/client/src/components/Datatable/TableFooter.js
a.bouhuolia 9e2c995813 fix: logo style.
fix: page forms style.
feat: auto-fill items entries from item details.
fix: hiding dashboard copyright bar.
2021-02-25 10:51:27 +02:00

34 lines
753 B
JavaScript

import React, { useContext } from 'react';
import TableContext from './TableContext';
/**
* Table footer.
*/
export default function TableFooter() {
const {
props: { footer },
table: { footerGroups },
} = useContext(TableContext);
// Can't contiunue if the footer is disabled.
if (!footer) { return null; }
return (
<div class="tfooter">
{footerGroups.map((group) => (
<div {...group.getFooterGroupProps({ className: 'tr' })}>
{group.headers.map((column) => (
<div
{...column.getFooterProps({
className: 'td',
})}
>
{column.render('Footer')}
</div>
))}
</div>
))}
</div>
);
}