Skip to content

Commit dfa9216

Browse files
committed
Update text-field.jsx
The isValid function return not correct, this caused re-rendering the whole TextField when value prop received.
1 parent 47bf496 commit dfa9216

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/text-field.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const ContextPure = require('./mixins/context-pure');
1616
* @returns True if the string provided is valid, false otherwise.
1717
*/
1818
function isValid(value) {
19-
return value || value === 0;
19+
return Boolean(value || value === 0);
2020
}
2121

2222
const TextField = React.createClass({

0 commit comments

Comments
 (0)