Commit 83c4c6ab authored by Joram Wilander's avatar Joram Wilander Committed by JoramWilander

Only update scroll position in multiselect if selection changes (#2128)

parent c5e83114
......@@ -43,7 +43,11 @@ export default class MultiSelectList extends React.Component {
}
}
componentDidUpdate() {
componentDidUpdate(_, prevState) {
if (prevState.selected === this.state.selected) {
return;
}
if (this.refs.list && this.refs.selected) {
const elemTop = this.refs.selected.getBoundingClientRect().top;
const elemBottom = this.refs.selected.getBoundingClientRect().bottom;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment