Merge branch 'smart-scroll' of https://github.com/gaearon/react-devtools-experimental into gaearon-smart-scroll

This commit is contained in:
Brian Vaughn
2019-04-12 10:56:27 -07:00
+1 -1
View File
@@ -68,7 +68,7 @@ export default function Tree(props: Props) {
// This is helpful for things like the owners list and search.
useLayoutEffect(() => {
if (selectedElementIndex !== null && listRef.current != null) {
listRef.current.scrollToItem(selectedElementIndex);
listRef.current.scrollToItem(selectedElementIndex, 'smart');
// Note this autoscroll only works for rows.
// There's another autoscroll inside the elements
// that ensures the component name is visible horizontally.