aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Panel.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Panel.jsx')
-rw-r--r--src/Panel.jsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Panel.jsx b/src/Panel.jsx
index 648944d..1bfe883 100644
--- a/src/Panel.jsx
+++ b/src/Panel.jsx
@@ -45,6 +45,7 @@ class Panel extends Component {
45 secondStep: PropTypes.number, 45 secondStep: PropTypes.number,
46 addon: PropTypes.func, 46 addon: PropTypes.func,
47 focusOnOpen: PropTypes.bool, 47 focusOnOpen: PropTypes.bool,
48 closeOnEsc: PropTypes.bool,
48 onKeyDown: PropTypes.func, 49 onKeyDown: PropTypes.func,
49 }; 50 };
50 51
@@ -60,6 +61,7 @@ class Panel extends Component {
60 addon: noop, 61 addon: noop,
61 onKeyDown: noop, 62 onKeyDown: noop,
62 inputReadOnly: false, 63 inputReadOnly: false,
64 closeOnEsc: true,
63 }; 65 };
64 66
65 constructor(props) { 67 constructor(props) {
@@ -117,6 +119,7 @@ class Panel extends Component {
117 disabledSeconds, hideDisabledOptions, allowEmpty, showHour, showMinute, showSecond, 119 disabledSeconds, hideDisabledOptions, allowEmpty, showHour, showMinute, showSecond,
118 format, defaultOpenValue, clearText, onEsc, addon, use12Hours, onClear, 120 format, defaultOpenValue, clearText, onEsc, addon, use12Hours, onClear,
119 focusOnOpen, onKeyDown, hourStep, minuteStep, secondStep, inputReadOnly, 121 focusOnOpen, onKeyDown, hourStep, minuteStep, secondStep, inputReadOnly,
122 closeOnEsc,
120 } = this.props; 123 } = this.props;
121 const { 124 const {
122 value, currentSelectPanel, 125 value, currentSelectPanel,
@@ -143,7 +146,7 @@ class Panel extends Component {
143 defaultOpenValue={defaultOpenValue} 146 defaultOpenValue={defaultOpenValue}
144 value={value} 147 value={value}
145 currentSelectPanel={currentSelectPanel} 148 currentSelectPanel={currentSelectPanel}
146 onEsc={onEsc} 149 onEsc={closeOnEsc ? onEsc : undefined}
147 format={format} 150 format={format}
148 placeholder={placeholder} 151 placeholder={placeholder}
149 hourOptions={hourOptions} 152 hourOptions={hourOptions}