Skip to content

Commit

Permalink
fix: should close panel when click presetted ranges, close: ant-desig…
Browse files Browse the repository at this point in the history
Rate limit · GitHub

Access has been restricted

You have triggered a rate limit.

Please wait a few minutes before you try again;
in some cases this may take up to an hour.

benjycui committed Oct 17, 2017
1 parent f26217b commit 7841386
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/date-picker/RangePicker.tsx
Original file line number Diff line number Diff line change
@@ -123,9 +123,9 @@ export default class RangePicker extends React.Component<any, any> {

handleHoverChange = hoverValue => this.setState({ hoverValue });

setValue(value) {
setValue(value, hidePanel?) {
this.handleChange(value);
if (!this.props.showTime) {
if (hidePanel || !this.props.showTime) {
this.setState({ open: false });
}
}
@@ -145,7 +145,7 @@ export default class RangePicker extends React.Component<any, any> {
return (
<a
key={range}
onClick={() => this.setValue(value)}
onClick={() => this.setValue(value, true)}
onMouseEnter={() => this.setState({ hoverValue: value })}
onMouseLeave={this.clearHoverValue}
>

0 comments on commit 7841386

Please sign in to comment.