Remove offset if displaying an unscrollable number of items in templates previews

pull/10616/head
ebb-tide 2018-07-03 14:07:18 -07:00
parent f6b4e1cf48
commit 32e4d0bf8d
1 changed files with 2 additions and 2 deletions

View File

@ -42,8 +42,8 @@ class TemplatePreviewList extends PureComponent<Props> {
private get resultsListHeight() {
const {items} = this.props
const count = Math.min(items.length, RESULTS_TO_DISPLAY)
return count * (LI_HEIGHT + LI_MARGIN_BOTTOM) - OFFSET
const scrollOffset = count > RESULTS_TO_DISPLAY ? OFFSET : 0
return count * (LI_HEIGHT + LI_MARGIN_BOTTOM) - scrollOffset
}
}