Skip to content

Commit f5ecf94

Browse files
committed
replace React.PropTypes with prop-types
1 parent 9915ac6 commit f5ecf94

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
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 = {};

src/BootstrapTable.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1412,13 +1412,13 @@ BootstrapTable.propTypes = {
14121412
onSortChange: PropTypes.func,
14131413
onPageChange: PropTypes.func,
14141414
onSizePerPageList: PropTypes.func,
1415-
onFilterChange: React.PropTypes.func,
1416-
onSearchChange: React.PropTypes.func,
1417-
onAddRow: React.PropTypes.func,
1418-
onExportToCSV: React.PropTypes.func,
1419-
onCellEdit: React.PropTypes.func,
1415+
onFilterChange: PropTypes.func,
1416+
onSearchChange: PropTypes.func,
1417+
onAddRow: PropTypes.func,
1418+
onExportToCSV: PropTypes.func,
1419+
onCellEdit: PropTypes.func,
14201420
noDataText: PropTypes.oneOfType([ PropTypes.string, PropTypes.object ]),
1421-
withoutNoDataText: React.PropTypes.bool,
1421+
withoutNoDataText: PropTypes.bool,
14221422
handleConfirmDeleteRow: PropTypes.func,
14231423
prePage: PropTypes.string,
14241424
nextPage: PropTypes.string,

0 commit comments

Comments
 (0)