X-Git-Url: https://gerrit.onap.org/r/gitweb?p=aai%2Fsparky-fe.git;a=blobdiff_plain;f=src%2Fgeneric-components%2Finput%2FSelectInput.jsx;h=557f4cb81ee34e255d613307a5cef446b6fe78c7;hp=13a1895e4afe907c2ce1d57946cd0918c351cb96;hb=fd2a6b124c62fe186364efd8eb28409ce7507902;hpb=c1917730a648ddbb6cd51307cea9464a697700d8 diff --git a/src/generic-components/input/SelectInput.jsx b/src/generic-components/input/SelectInput.jsx index 13a1895..557f4cb 100644 --- a/src/generic-components/input/SelectInput.jsx +++ b/src/generic-components/input/SelectInput.jsx @@ -36,11 +36,12 @@ */ import React, {Component} from 'react'; import Select from 'react-select'; +import 'react-select/dist/react-select.css'; class SelectInput extends Component { - + inputValue = []; - + render() { let {label, value, ...other} = this.props; return ( @@ -54,20 +55,20 @@ class SelectInput extends Component { ); } - + getValue() { return this.inputValue && this.inputValue.length ? this.inputValue : ''; } - + onSelectChanged(value) { this.props.onMultiSelectChanged(value); } - + componentDidMount() { let {value} = this.props; this.inputValue = value ? value : []; } - + componentDidUpdate() { if (this.inputValue !== this.props.value) { this.inputValue = this.props.value;