Skip to content

Commit

Permalink
Add a noop onChange to remove react's warning
Browse files Browse the repository at this point in the history
> 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`.
  • Loading branch information
yesmeck committed Nov 19, 2017
1 parent a60ac4d commit fdead5a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/TimePicker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ export default class Picker extends Component {
onFocus={onFocus}
onBlur={onBlur}
autoFocus={autoFocus}
onChange={noop}
/>
<span className={`${prefixCls}-icon`}/>
</span>
Expand Down

0 comments on commit fdead5a

Please sign in to comment.