diff --git a/FloatingLabel.js b/FloatingLabel.js index 326d749..a68033c 100644 --- a/FloatingLabel.js +++ b/FloatingLabel.js @@ -54,7 +54,7 @@ class FloatingLabel extends Textbox { {locals.label} - const placeholderString = (self.state.placeholderString !== undefined) ? self.state.placeholderString : locals.label; + const placeholderString = (self.state.fieldFocused) ? '' : self.state.placeholderString || locals.label; return ( { if (locals.editable === false) { @@ -147,6 +147,10 @@ class FloatingLabel extends Textbox { ].forEach((name) => locals[name] = this.props.options[name]); return locals; } + + shouldComponentUpdate (nextProps, nextState) { + return true; + } } const styles = React.StyleSheet.create({