mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 14:13:37 +08:00
site: fix react-router warning
This commit is contained in:
parent
7692bf3d42
commit
b0fc16c3fc
@ -43,7 +43,7 @@ export default class Header extends React.Component {
|
||||
}
|
||||
|
||||
handleSearch(value) {
|
||||
this.props.history.push({ pathname: value });
|
||||
this.context.router.push({ pathname: value });
|
||||
}
|
||||
|
||||
handleSelectFilter(value, option) {
|
||||
@ -137,3 +137,7 @@ export default class Header extends React.Component {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Header.contextTypes = {
|
||||
router: React.PropTypes.object.isRequired,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user