From d907505b9f219f4ef2885166846251c7e0c65de9 Mon Sep 17 00:00:00 2001
From: Aleksandr Denisenko <aleksandr.denisenko.it@gmail.com>
Date: Fri, 17 Nov 2017 11:55:18 +0200
Subject: make header input readonly by an optional prop

---
 src/Panel.jsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'src/Panel.jsx')

diff --git a/src/Panel.jsx b/src/Panel.jsx
index a1b7c77..c23241d 100644
--- a/src/Panel.jsx
+++ b/src/Panel.jsx
@@ -27,6 +27,7 @@ class Panel extends Component {
     value: PropTypes.object,
     placeholder: PropTypes.string,
     format: PropTypes.string,
+    readOnlyInput: PropTypes.bool,
     disabledHours: PropTypes.func,
     disabledMinutes: PropTypes.func,
     disabledSeconds: PropTypes.func,
@@ -58,6 +59,7 @@ class Panel extends Component {
     use12Hours: false,
     addon: noop,
     onKeyDown: noop,
+    readOnlyInput: false,
   };
 
   constructor(props) {
@@ -96,7 +98,7 @@ class Panel extends Component {
       prefixCls, className, placeholder, disabledHours, disabledMinutes,
       disabledSeconds, hideDisabledOptions, allowEmpty, showHour, showMinute, showSecond,
       format, defaultOpenValue, clearText, onEsc, addon, use12Hours, onClear,
-      focusOnOpen, onKeyDown, hourStep, minuteStep, secondStep,
+      focusOnOpen, onKeyDown, hourStep, minuteStep, secondStep, readOnlyInput,
     } = this.props;
     const {
       value, currentSelectPanel,
@@ -137,6 +139,7 @@ class Panel extends Component {
           allowEmpty={allowEmpty}
           focusOnOpen={focusOnOpen}
           onKeyDown={onKeyDown}
+          readOnlyInput={readOnlyInput}
         />
         <Combobox
           prefixCls={prefixCls}
-- 
cgit v1.2.3

