summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package.json2
-rw-r--r--src/generic-components/input/SelectInput.jsx13
-rw-r--r--src/index.html1
3 files changed, 8 insertions, 8 deletions
diff --git a/package.json b/package.json
index e93be47..325c418 100644
--- a/package.json
+++ b/package.json
@@ -48,7 +48,7 @@
"topojson": "^2.2.0",
"uuid-js": "^0.7.5",
"validator": "^4.3.0",
- "vertical-filter-bar": "0.0.4"
+ "vertical-filter-bar": "1.0.4"
},
"devDependencies": {
"babel-core": "^6.9.1",
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 {
</div>
);
}
-
+
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;
diff --git a/src/index.html b/src/index.html
index 73b082b..79775df 100644
--- a/src/index.html
+++ b/src/index.html
@@ -26,7 +26,6 @@
<head>
<meta charset="utf-8">
<title>A&AI UI</title>
- <link rel="stylesheet" href="https://unpkg.com/react-select/dist/react-select.css">
</head>
<body>