From 63b143acbab4243f2a6c8ff6803d69528e0fd800 Mon Sep 17 00:00:00 2001 From: Arnaud Limbourg Date: Sat, 29 Nov 2014 18:21:27 +0100 Subject: [PATCH] onKeyDown handler We should be able to pass an onKeyDown handler. A use-case is to kno when the user pressed "enter" in the input. --- src/js/input.jsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/js/input.jsx b/src/js/input.jsx index db12efe4807c62..1ed6d29b1ca2b2 100644 --- a/src/js/input.jsx +++ b/src/js/input.jsx @@ -17,7 +17,8 @@ var Input = React.createClass({ placeholder: React.PropTypes.string, type: React.PropTypes.string, name: React.PropTypes.string.isRequired, - onChange: React.PropTypes.func + onChange: React.PropTypes.func, + onKeyDown: React.PropTypes.func }, mixins: [Classable], @@ -56,11 +57,11 @@ var Input = React.createClass({