summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/src
diff options
context:
space:
mode:
authorYarin Dekel <yarind@amdocs.com>2018-11-29 10:24:07 +0200
committerEinav Keidar <einavw@amdocs.com>2018-12-02 11:51:49 +0000
commit42b83b0b7a51849671cfa4718b55cbf7fe2df8a2 (patch)
tree02e471fb1164783c00b47d743b25f0b9a26488fd /openecomp-ui/src
parent6ce1094d509195fe484761467a67a6b3757593b0 (diff)
onbaording search visibility
Issue-ID: SDC-1963 Change-Id: I2e40deb35970c848422c471114fccf2bb5c331e2 Signed-off-by: Yarin Dekel <yarind@amdocs.com>
Diffstat (limited to 'openecomp-ui/src')
-rw-r--r--openecomp-ui/src/nfvo-components/input/ExpandableInput.jsx15
1 files changed, 10 insertions, 5 deletions
diff --git a/openecomp-ui/src/nfvo-components/input/ExpandableInput.jsx b/openecomp-ui/src/nfvo-components/input/ExpandableInput.jsx
index 3973ae8c5d..be0ebf2bdd 100644
--- a/openecomp-ui/src/nfvo-components/input/ExpandableInput.jsx
+++ b/openecomp-ui/src/nfvo-components/input/ExpandableInput.jsx
@@ -95,11 +95,16 @@ class ExpandableInput extends React.Component {
value: PropTypes.string
};
- state = { showInput: false };
+ constructor(props) {
+ super(props);
+ this.state = {
+ showInput: !!props.value || false
+ };
+ }
- closeInput() {
- if (!this.props.value) {
- this.setState({ showInput: false });
+ showInputChange() {
+ if (this.props.value) {
+ this.setState({ showInput: true });
}
}
@@ -118,7 +123,7 @@ class ExpandableInput extends React.Component {
onChange={onChange}
value={value}
handleKeyDown={e => this.handleKeyDown(e)}
- handleBlur={() => this.closeInput()}
+ handleBlur={() => this.showInputChange()}
/>
)}
{!this.state.showInput && (