From 32e4d0bf8dedc6ad9a0b413498bcc1988f6bcca7 Mon Sep 17 00:00:00 2001 From: ebb-tide Date: Tue, 3 Jul 2018 14:07:18 -0700 Subject: [PATCH] Remove offset if displaying an unscrollable number of items in templates previews --- ui/src/tempVars/components/TemplatePreviewList.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/tempVars/components/TemplatePreviewList.tsx b/ui/src/tempVars/components/TemplatePreviewList.tsx index 90c8b752cc..52b5352c6d 100644 --- a/ui/src/tempVars/components/TemplatePreviewList.tsx +++ b/ui/src/tempVars/components/TemplatePreviewList.tsx @@ -42,8 +42,8 @@ class TemplatePreviewList extends PureComponent { 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 } }