Kaynağa Gözat

Merge pull request #141 from smiclea/fix-dropdown

Fix dropdown's list position when page is scrolled
Dorin Paslaru 8 yıl önce
ebeveyn
işleme
87143bba34

+ 1 - 1
src/components/molecules/Dropdown/Dropdown.jsx

@@ -158,7 +158,7 @@ class Dropdown extends React.Component {
       this.tipRef.style.display = 'block'
       this.tipRef.style.display = 'block'
     }
     }
 
 
-    this.listRef.style.top = `${listTop}px`
+    this.listRef.style.top = `${listTop + window.pageYOffset}px`
     this.listRef.style.left = `${this.buttonRect.left}px`
     this.listRef.style.left = `${this.buttonRect.left}px`
   }
   }