Fix ts error

This commit is contained in:
afc163 2017-12-16 21:10:15 +08:00
parent b49c0ac35c
commit 7a98f6236f

View File

@ -97,7 +97,7 @@ export default class RangePicker extends React.Component<any, any> {
handleChange = (value: moment.Moment[]) => { handleChange = (value: moment.Moment[]) => {
const props = this.props; const props = this.props;
if (!('value' in props)) { if (!('value' in props)) {
this.setState(({ showDate }) => ({ this.setState(({ showDate }: { showDate: boolean }) => ({
value, value,
showDate: getShowDateFromValue(value) || showDate, showDate: getShowDateFromValue(value) || showDate,
})); }));