]> git.immae.eu Git - github/fretlink/time-picker.git/commitdiff
show scrollbar when hover
authorafc163 <afc163@gmail.com>
Sun, 29 Nov 2015 07:14:32 +0000 (15:14 +0800)
committerafc163 <afc163@gmail.com>
Sun, 29 Nov 2015 07:14:32 +0000 (15:14 +0800)
assets/index/Select.less
src/module/Select.jsx

index 4efeac9ba721077e150c8aabd924320527454532..bca25f99083f40e3e94883f3aca15bed396086f7 100644 (file)
@@ -8,6 +8,10 @@
   width: 56px;
   overflow: hidden;
 
+  &:hover {
+    overflow-y: auto;
+  }
+
   &:first-child {
     border-left: 0;
     margin-left: 0;
 
   ul {
     list-style: none;
-    box-sizing: content-box;
+    box-sizing: border-box;
     margin: 0;
     padding: 0;
     width: 100%;
     max-height: 144px;
-    overflow: auto;
-    padding-right: 16px;
   }
 
   li {
     list-style: none;
-    box-sizing: content-box;
+    box-sizing: border-box;
     margin: 0;
     padding: 0 0 0 16px;
     width: 100%;
index 119e59ecd730dfe2a83b8f64d25ceb13340a6a90..b386d071d6def84e2675e75b8a4a87dcc0b20fc5 100644 (file)
@@ -64,7 +64,7 @@ const Select = React.createClass({
     }
     const topOption = list.children[index];
     const to = topOption.offsetTop - select.offsetTop;
-    scrollTo(list, to, duration);
+    scrollTo(select, to, duration);
   },
 
   render() {