Skip to content

Commit a752af8

Browse files
committed
Merge branch 'SidKwok-v4.0.0-dev' into v4.0.0-dev
2 parents 4624364 + 9b10617 commit a752af8

33 files changed

+111
-146
lines changed

examples/js/column-filter/custom-filter.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* eslint max-len: 0 */
22
/* eslint no-unused-vars: 0 */
33
import React from 'react';
4+
import PropTypes from 'prop-types';
45
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
56

67
const products = [];
@@ -60,9 +61,9 @@ class CheckboxFilter extends React.Component {
6061
}
6162

6263
CheckboxFilter.propTypes = {
63-
filterHandler: React.PropTypes.func.isRequired,
64-
textOK: React.PropTypes.string,
65-
textNOK: React.PropTypes.string
64+
filterHandler: PropTypes.func.isRequired,
65+
textOK: PropTypes.string,
66+
textNOK: PropTypes.string
6667
};
6768

6869
CheckboxFilter.defaultProps = {

examples/js/components/App.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* eslint max-len: 0 */
22
import React from 'react';
3+
import PropTypes from 'prop-types';
34
import 'react-s-alert/dist/s-alert-default.css';
45
import 'react-s-alert/dist/s-alert-css-effects/scale.css';
56
import '../../../css/react-bootstrap-table.css';
@@ -12,7 +13,7 @@ import {
1213
class App extends React.Component {
1314

1415
static propTypes = {
15-
children: React.PropTypes.node
16+
children: PropTypes.node
1617
};
1718

1819
static defaultProps = {};

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
},
7070
"dependencies": {
7171
"classnames": "^2.1.2",
72+
"prop-types": "^15.5.10",
7273
"react-modal": "^1.4.0",
7374
"react-s-alert": "^1.3.0"
7475
},

src/BootstrapTable.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* eslint no-alert: 0 */
22
/* eslint max-len: 0 */
3-
import React, { Component, PropTypes } from 'react';
3+
import React, { Component } from 'react';
4+
import PropTypes from 'prop-types';
45
import classSet from 'classnames';
56
import Const from './Const';
67
import TableHeader from './TableHeader';
@@ -1432,13 +1433,13 @@ BootstrapTable.propTypes = {
14321433
onSortChange: PropTypes.func,
14331434
onPageChange: PropTypes.func,
14341435
onSizePerPageList: PropTypes.func,
1435-
onFilterChange: React.PropTypes.func,
1436-
onSearchChange: React.PropTypes.func,
1437-
onAddRow: React.PropTypes.func,
1438-
onExportToCSV: React.PropTypes.func,
1439-
onCellEdit: React.PropTypes.func,
1436+
onFilterChange: PropTypes.func,
1437+
onSearchChange: PropTypes.func,
1438+
onAddRow: PropTypes.func,
1439+
onExportToCSV: PropTypes.func,
1440+
onCellEdit: PropTypes.func,
14401441
noDataText: PropTypes.oneOfType([ PropTypes.string, PropTypes.object ]),
1441-
withoutNoDataText: React.PropTypes.bool,
1442+
withoutNoDataText: PropTypes.bool,
14421443
handleConfirmDeleteRow: PropTypes.func,
14431444
prePage: PropTypes.string,
14441445
nextPage: PropTypes.string,

src/SelectRowHeaderColumn.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component, PropTypes } from 'react';
1+
import React, { Component } from 'react';
2+
import PropTypes from 'prop-types';
23

34
class SelectRowHeaderColumn extends Component {
45

src/TableBody.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component, PropTypes } from 'react';
1+
import React, { Component } from 'react';
2+
import PropTypes from 'prop-types';
23
import Utils from './util';
34
import Const from './Const';
45
import TableRow from './TableRow';

src/TableColumn.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component, PropTypes } from 'react';
1+
import React, { Component } from 'react';
2+
import PropTypes from 'prop-types';
23
import ReactDOM from 'react-dom';
34
import Const from './Const';
45

src/TableEditColumn.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component, PropTypes } from 'react';
1+
import React, { Component } from 'react';
2+
import PropTypes from 'prop-types';
23
import ReactDOM from 'react-dom';
34
import editor from './Editor';
45
import { notice } from './Notification.js';

src/TableFilter.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component, PropTypes } from 'react';
1+
import React, { Component } from 'react';
2+
import PropTypes from 'prop-types';
23
import Const from './Const';
34
import classSet from 'classnames';
45

src/TableHeader.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component, PropTypes } from 'react';
1+
import React, { Component } from 'react';
2+
import PropTypes from 'prop-types';
23
import ReactDOM from 'react-dom';
34
import Const from './Const';
45
import classSet from 'classnames';

src/TableHeaderColumn.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* eslint default-case: 0 */
22
/* eslint guard-for-in: 0 */
3-
import React, { Component, PropTypes } from 'react';
3+
import React, { Component } from 'react';
4+
import PropTypes from 'prop-types';
45
import classSet from 'classnames';
56
import Const from './Const';
67
import Util from './util';

src/TableRow.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* eslint no-nested-ternary: 0 */
22
import classSet from 'classnames';
3-
import React, { Component, PropTypes } from 'react';
3+
import React, { Component } from 'react';
4+
import PropTypes from 'prop-types';
45

56
class TableRow extends Component {
67

src/filters/Date.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* eslint quotes: 0 */
22
/* eslint max-len: 0 */
3-
import React, { Component, PropTypes } from 'react';
3+
import React, { Component } from 'react';
4+
import PropTypes from 'prop-types';
45
import Const from '../Const';
56

67
const legalComparators = [ '=', '>', '>=', '<', '<=', '!=' ];

src/filters/Number.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component, PropTypes } from 'react';
1+
import React, { Component } from 'react';
2+
import PropTypes from 'prop-types';
23
import classSet from 'classnames';
34
import Const from '../Const';
45

src/filters/Regex.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component, PropTypes } from 'react';
1+
import React, { Component } from 'react';
2+
import PropTypes from 'prop-types';
23
import Const from '../Const';
34

45
class RegexFilter extends Component {

src/filters/Select.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component, PropTypes } from 'react';
1+
import React, { Component } from 'react';
2+
import PropTypes from 'prop-types';
23
import classSet from 'classnames';
34
import Const from '../Const';
45

src/filters/Text.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component, PropTypes } from 'react';
1+
import React, { Component } from 'react';
2+
import PropTypes from 'prop-types';
23
import Const from '../Const';
34

45
class TextFilter extends Component {

src/pagination/PageButton.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component, PropTypes } from 'react';
1+
import React, { Component } from 'react';
2+
import PropTypes from 'prop-types';
23
import classSet from 'classnames';
34

45
class PageButton extends Component {

src/pagination/PaginationList.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component, PropTypes } from 'react';
1+
import React, { Component } from 'react';
2+
import PropTypes from 'prop-types';
23
import classSet from 'classnames';
34
import PageButton from './PageButton.js';
45
import SizePerPageDropDown from './SizePerPageDropDown';

src/pagination/SizePerPageDropDown.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component, PropTypes } from 'react';
1+
import React, { Component } from 'react';
2+
import PropTypes from 'prop-types';
23

34
const sizePerPageDefaultClass = 'react-bs-table-sizePerPage-dropdown';
45

src/toolbar/ButtonGroup.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component, PropTypes } from 'react';
1+
import React, { Component } from 'react';
2+
import PropTypes from 'prop-types';
23

34
class ButtonGroup extends Component {
45
render() {

src/toolbar/ClearSearchButton.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component, PropTypes } from 'react';
1+
import React, { Component } from 'react';
2+
import PropTypes from 'prop-types';
23

34
const clearBtnDefaultClass = 'react-bs-table-search-clear-btn';
45

src/toolbar/DeleteButton.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component, PropTypes } from 'react';
1+
import React, { Component } from 'react';
2+
import PropTypes from 'prop-types';
23
import Const from '../Const';
34

45
const deleteBtnDefaultClass = 'react-bs-table-del-btn';

src/toolbar/ExportCSVButton.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component, PropTypes } from 'react';
1+
import React, { Component } from 'react';
2+
import PropTypes from 'prop-types';
23
import Const from '../Const';
34

45
const exportCsvBtnDefaultClass = 'react-bs-table-csv-btn';

src/toolbar/InsertButton.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component, PropTypes } from 'react';
1+
import React, { Component } from 'react';
2+
import PropTypes from 'prop-types';
23
import Const from '../Const';
34

45
const insertBtnDefaultClass = 'react-bs-table-add-btn';

src/toolbar/InsertModal.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* eslint no-console: 0 */
22

3-
import React, { Component, PropTypes } from 'react';
3+
import React, { Component } from 'react';
4+
import PropTypes from 'prop-types';
45

56
import InsertModalHeader from './InsertModalHeader';
67
import InsertModalFooter from './InsertModalFooter';

src/toolbar/InsertModalBody.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* eslint react/display-name: 0 */
2-
import React, { Component, PropTypes } from 'react';
2+
import React, { Component } from 'react';
3+
import PropTypes from 'prop-types';
34

45
import editor from '../Editor';
56

src/toolbar/InsertModalFooter.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component, PropTypes } from 'react';
1+
import React, { Component } from 'react';
2+
import PropTypes from 'prop-types';
23
import Const from '../Const';
34

45
class InsertModalFooter extends Component {

src/toolbar/InsertModalHeader.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component, PropTypes } from 'react';
1+
import React, { Component } from 'react';
2+
import PropTypes from 'prop-types';
23

34
class InsertModalHeader extends Component {
45

src/toolbar/SearchField.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component, PropTypes } from 'react';
1+
import React, { Component } from 'react';
2+
import PropTypes from 'prop-types';
23
import ReactDOM from 'react-dom';
34

45
class SearchField extends Component {

src/toolbar/ShowSelectedOnlyButton.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component, PropTypes } from 'react';
1+
import React, { Component } from 'react';
2+
import PropTypes from 'prop-types';
23
import Const from '../Const';
34

45
const showSelectedOnlyBtnDefaultClass = 'react-bs-table-show-sel-only-btn';

src/toolbar/ToolBar.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* eslint no-console: 0 */
22

3-
import React, { Component, PropTypes } from 'react';
3+
import React, { Component } from 'react';
4+
import PropTypes from 'prop-types';
45
import Modal from 'react-modal';
56
// import classSet from 'classnames';
67
import Const from '../Const';

0 commit comments

Comments
 (0)