Add Coverage Test for MultipleSelectorSection

Summary:
To comply with recent agreement, coverage test for MultipleSelectorSection is added.

Also, add undefined check in `elements.tsx` found while adding the test

Reviewed By: mweststrate

Differential Revision: D21554782

fbshipit-source-id: 7cd868bf16f6105d6f523048f29bdaa052837f45
This commit is contained in:
Chaiwat Ekkaewnumchai
2020-05-15 12:47:53 -07:00
committed by Facebook GitHub Bot
parent a65b6025c1
commit 8fa03789d1
2 changed files with 148 additions and 9 deletions

View File

@@ -690,15 +690,17 @@ export class Elements extends PureComponent<ElementsProps, ElementsState> {
return;
}
const outer = this._outerRef.current;
outer.scrollTo(
0,
this._calculateScrollTop(
outer.offsetHeight,
outer.scrollTop,
selectedRow.offsetHeight,
selectedRow.offsetTop,
),
);
if (outer.scrollTo) {
outer.scrollTo(
0,
this._calculateScrollTop(
outer.offsetHeight,
outer.scrollTop,
selectedRow.offsetHeight,
selectedRow.offsetTop,
),
);
}
}
: null
}