Skip to content
Snippets Groups Projects
Commit 7c1e6b57 authored by Tom Robinson's avatar Tom Robinson
Browse files

TokenField: scroll to end of values list when adding value

parent 173c74d3
No related branches found
No related tags found
No related merge requests found
......@@ -453,6 +453,13 @@ export default class TokenField extends Component {
element.scrollIntoView(element);
}
}
// if we added a valkue then scroll to the last item (the input)
if (this.props.value.length > prevProps.value.length) {
let input = findDOMNode(this.refs.input);
if (input && isObscured(input)) {
input.scrollIntoView(input);
}
}
}
render() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment