Skip to content

Commit

Permalink
published version 2.0.0-beta-18
Browse files Browse the repository at this point in the history
  • Loading branch information
gregnb committed Jul 29, 2018
1 parent a22e943 commit 31db541
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 38 deletions.
9 changes: 4 additions & 5 deletions docs/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ class Homepage extends React.Component {
<Layout>
<div>
<p>
MUI-Datatables is a data tables component built on{" "}
<a href="https://www.material-ui.com">Material-UI V1</a>. It comes with features like filtering,
view/hide columns, search, export to CSV download, printing, selectable rows, pagination, and sorting. On
top of the ability to customize styling on most views, there are two responsive modes "stacked" and "scroll"
for mobile/tablet devices.
MUI-Datatables is a data tables component built on <a href="https://www.material-ui.com">Material-UI V1</a>.
It comes with features like filtering, view/hide columns, search, export to CSV download, printing,
selectable rows, pagination, and sorting. On top of the ability to customize styling on most views, there
are two responsive modes "stacked" and "scroll" for mobile/tablet devices.
</p>
<img src="/static/mui-datatables-main.jpg" className={classes.mainImage} border="0" />

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mui-datatables",
"version": "2.0.0-beta-17",
"version": "2.0.0-beta-18",
"description": "Datatables for React using Material-UI",
"main": "dist/index.js",
"files": [
Expand Down
30 changes: 14 additions & 16 deletions src/MUIDataTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class MUIDataTable extends React.Component {
filter: PropTypes.bool,
sort: PropTypes.bool,
customHeadRender: PropTypes.func,
customBodyRender: PropTypes.func
customBodyRender: PropTypes.func,
}),
}),
]),
Expand Down Expand Up @@ -735,21 +735,19 @@ class MUIDataTable extends React.Component {
</Table>
</div>
<Table>
{this.options.customFooter ? (
this.options.customFooter(rowCount, page, rowsPerPage, this.changeRowsPerPage, this.changePage)
) : (
this.options.pagination && (
<MUIDataTablePagination
count={rowCount}
page={page}
rowsPerPage={rowsPerPage}
changeRowsPerPage={this.changeRowsPerPage}
changePage={this.changePage}
component={"div"}
options={this.options}
/>
)
)}
{this.options.customFooter
? this.options.customFooter(rowCount, page, rowsPerPage, this.changeRowsPerPage, this.changePage)
: this.options.pagination && (
<MUIDataTablePagination
count={rowCount}
page={page}
rowsPerPage={rowsPerPage}
changeRowsPerPage={this.changeRowsPerPage}
changePage={this.changePage}
component={"div"}
options={this.options}
/>
)}
</Table>
<div className={classes.liveAnnounce} aria-live={"polite"} ref={el => (this.announceRef = el)}>
{announceText}
Expand Down
31 changes: 15 additions & 16 deletions src/MUIDataTableHead.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,21 @@ class MUIDataTableHead extends React.Component {
)}
{columns.map(
(column, index) =>
column.display && (
column.customHeadRender ? (
column.customHeadRender({ index, ...column }, this.handleToggleColumn)
) : (
<MUIDataTableHeadCell
key={index}
index={index}
type={"cell"}
sort={column.sort}
sortDirection={column.sortDirection}
toggleSort={this.handleToggleColumn}
options={options}>
{column.name}
</MUIDataTableHeadCell>
)
),
column.display &&
(column.customHeadRender ? (
column.customHeadRender({ index, ...column }, this.handleToggleColumn)
) : (
<MUIDataTableHeadCell
key={index}
index={index}
type={"cell"}
sort={column.sort}
sortDirection={column.sortDirection}
toggleSort={this.handleToggleColumn}
options={options}>
{column.name}
</MUIDataTableHeadCell>
)),
)}
</MUIDataTableHeadRow>
</TableHead>
Expand Down

0 comments on commit 31db541

Please sign in to comment.