Skip to content

Commit fee412a

Browse files
committed
Revert "fix for arqex#163 (componentWillReceiveProps() is not honouring old state) (arqex#165)"
This reverts commit 8e56aa8.
1 parent d6f9b13 commit fee412a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

DateTime.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,11 @@ var Datetime = React.createClass({
162162
}
163163

164164
if ( updatedState.open === undefined ) {
165-
updatedState.open = this.state.open;
165+
if ( this.props.closeOnSelect && this.state.currentView !== 'time' ) {
166+
updatedState.open = false;
167+
} else {
168+
updatedState.open = this.state.open;
169+
}
166170
}
167171

168172
if ( nextProps.viewMode !== this.props.viewMode ) {

0 commit comments

Comments
 (0)