aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/module
diff options
context:
space:
mode:
Diffstat (limited to 'src/module')
-rw-r--r--src/module/Select.jsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/module/Select.jsx b/src/module/Select.jsx
index ab10789..2ab9e61 100644
--- a/src/module/Select.jsx
+++ b/src/module/Select.jsx
@@ -38,9 +38,11 @@ const Select = React.createClass({
38 this.scrollToSelected(0); 38 this.scrollToSelected(0);
39 }, 39 },
40 40
41 componentDidUpdate() { 41 componentDidUpdate(prevProps) {
42 // smooth scroll to selected option 42 // smooth scroll to selected option
43 this.scrollToSelected(120); 43 if (prevProps.selectedIndex !== this.props.selectedIndex) {
44 this.scrollToSelected(120);
45 }
44 }, 46 },
45 47
46 onSelect(value) { 48 onSelect(value) {