From: Wei Zhu Date: Sun, 19 Nov 2017 13:21:04 +0000 (+0800) Subject: Add a noop onChange to remove react's warning X-Git-Tag: 3.2.1~1 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=fdead5abeff4a9ebaf323a5f5e695c2044ba1651;p=github%2Ffretlink%2Ftime-picker.git Add a noop onChange to remove react's warning > Warning: Failed prop type: You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`. --- diff --git a/src/TimePicker.jsx b/src/TimePicker.jsx index 9a91a2c..e3c5a79 100644 --- a/src/TimePicker.jsx +++ b/src/TimePicker.jsx @@ -285,6 +285,7 @@ export default class Picker extends Component { onFocus={onFocus} onBlur={onBlur} autoFocus={autoFocus} + onChange={noop} />