From dfa921628a1ce71cf75abc155908561accc46fa3 Mon Sep 17 00:00:00 2001 From: Quangbuu Le Date: Fri, 6 Nov 2015 11:29:25 +0700 Subject: [PATCH] Update text-field.jsx The isValid function return not correct, this caused re-rendering the whole TextField when value prop received. --- src/text-field.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/text-field.jsx b/src/text-field.jsx index 397d2a4259c94f..8be6b8bfada799 100644 --- a/src/text-field.jsx +++ b/src/text-field.jsx @@ -16,7 +16,7 @@ const ContextPure = require('./mixins/context-pure'); * @returns True if the string provided is valid, false otherwise. */ function isValid(value) { - return value || value === 0; + return Boolean(value || value === 0); } const TextField = React.createClass({