Skip to content

Commit a7a9af9

Browse files
Benjamin BoursBenjamin Bours
Benjamin Bours
authored and
Benjamin Bours
committed
#158 add link, merge from master
2 parents 34c7e99 + 39c581b commit a7a9af9

10 files changed

+306
-222
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ The component accepts the following props:
157157
|**`onChangePage`**|function||Callback function that triggers when a page has changed. `function(currentPage: number) => void`
158158
|**`onChangeRowsPerPage`**|function||Callback function that triggers when the number of rows per page has changed. `function(numberOfRows: number) => void`
159159
|**`onSearchChange`**|function||Callback function that triggers when the search text value has changed. `function(searchText: string) => void`
160+
|**`onSearchClose`**|function||Callback function that triggers when the search input is closed. `function() => void`
160161
|**`onFilterChange`**|function||Callback function that triggers when filters have changed. `function(changedColumn: string, filterList: array) => void`
161162
|**`onColumnSortChange`**|function||Callback function that triggers when a column has been sorted. `function(changedColumn: string, direction: string) => void`
162163
|**`onColumnViewChange`**|function||Callback function that triggers when a column view has been changed. `function(changedColumn: string, action: string) => void`

package-lock.json

Lines changed: 96 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mui-datatables",
3-
"version": "2.0.0-beta-22",
3+
"version": "2.0.0-beta-23",
44
"description": "Datatables for React using Material-UI",
55
"main": "dist/index.js",
66
"files": [
@@ -53,8 +53,8 @@
5353
"chai": "^4.1.2",
5454
"coveralls": "^3.0.0",
5555
"cross-env": "^5.1.1",
56-
"enzyme": "^3.2.0",
57-
"enzyme-adapter-react-16": "^1.1.0",
56+
"enzyme": "^3.5.0",
57+
"enzyme-adapter-react-16": "^1.3.0",
5858
"eslint": "^4.14.0",
5959
"eslint-loader": "^2.0.0",
6060
"eslint-plugin-filenames": "^1.2.0",

src/DataStyles.js

Lines changed: 0 additions & 71 deletions
This file was deleted.

src/MUIDataTable.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,8 @@ class MUIDataTable extends React.Component {
601601
},
602602
() => {
603603
if (this.options.onRowsSelect) {
604-
this.options.onRowsSelect(this.state.curSelectedRows.data, this.state.selectedRows.data);
604+
console.log(this.state.curSelectedRows);
605+
this.options.onRowsSelect(this.state.curSelectedRows.data[0], this.state.selectedRows.data);
605606
}
606607
},
607608
);

src/MUIDataTableResize.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,14 @@ class MUIDataTableResize extends React.Component {
3232
};
3333

3434
handleReize = () => {
35-
this.setDividers();
35+
if (window.innerWidth !== this.windowWidth) {
36+
this.windowWidth = window.innerWidth;
37+
this.setDividers();
38+
}
3639
};
3740

3841
componentDidMount() {
42+
this.windowWidth = null;
3943
this.props.setResizeable(this.setCellRefs);
4044
window.addEventListener("resize", this.handleReize, false);
4145
}

0 commit comments

Comments
 (0)