From d2b71fca749677be6e6958e5cf25587bb270ef9e Mon Sep 17 00:00:00 2001 From: Ivan Minevskiy Date: Mon, 2 Nov 2015 14:17:40 -0800 Subject: [PATCH] Don't render the lookup label if the label is empty --- components/SLDSLookup/index.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/SLDSLookup/index.jsx b/components/SLDSLookup/index.jsx index 2023de1d9e..48220ddf3d 100644 --- a/components/SLDSLookup/index.jsx +++ b/components/SLDSLookup/index.jsx @@ -320,12 +320,16 @@ class SLDSLookup extends React.Component { let componentClasses = this.state.selectedIndex === null ? "slds-lookup ignore-react-onclickoutside":"slds-lookup ignore-react-onclickoutside slds-has-selection"; let inputContainerClasses = this.state.selectedIndex === null ? '':' slds-input'; let inputContainerStyle = this.state.selectedIndex === null ? {} : {padding: '5px'}; + let inputLabel; + if (this.props.label) { + inputLabel = + } return (
- + {inputLabel}
{ this.state.selectedIndex !== null ? this.renderSelectedItem() : null }