Skip to content

Commit

Permalink
Align center
Browse files Browse the repository at this point in the history
  • Loading branch information
Stas-Buzunko committed May 5, 2021
1 parent 1250795 commit b3feba6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Select.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class Select extends Component {
index = 0;
}
const topOption = this.list.children[index];
const to = topOption.offsetTop;
const to = topOption.offsetTop + topOption.offsetHeight / 2 - this.root.offsetHeight / 2; // align center
scrollTo(this.root, to, duration);
}

Expand Down

0 comments on commit b3feba6

Please sign in to comment.