From f65839ec8fbfd338e5c46e8fffa8b35816cb4490 Mon Sep 17 00:00:00 2001 From: mabashian Date: Mon, 8 Feb 2021 15:50:35 -0500 Subject: [PATCH] Move loading spinner inside output panel --- .../src/screens/Job/JobOutput/JobOutput.jsx | 42 ++++++++++--------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/awx/ui_next/src/screens/Job/JobOutput/JobOutput.jsx b/awx/ui_next/src/screens/Job/JobOutput/JobOutput.jsx index 768dea9e6c..960210a95e 100644 --- a/awx/ui_next/src/screens/Job/JobOutput/JobOutput.jsx +++ b/awx/ui_next/src/screens/Job/JobOutput/JobOutput.jsx @@ -705,10 +705,6 @@ function JobOutput({ /> ); - if (hasContentLoading) { - return ; - } - if (contentError) { return ; } @@ -779,21 +775,29 @@ function JobOutput({ {({ width, height }) => { return ( - { - registerChild(ref); - listRef.current = ref; - }} - deferredMeasurementCache={cache} - height={height || 1} - onRowsRendered={onRowsRendered} - rowCount={remoteRowCount} - rowHeight={cache.rowHeight} - rowRenderer={rowRenderer} - scrollToAlignment="start" - width={width || 1} - overscanRowCount={20} - /> + <> + {hasContentLoading ? ( +
+ +
+ ) : ( + { + registerChild(ref); + listRef.current = ref; + }} + deferredMeasurementCache={cache} + height={height || 1} + onRowsRendered={onRowsRendered} + rowCount={remoteRowCount} + rowHeight={cache.rowHeight} + rowRenderer={rowRenderer} + scrollToAlignment="start" + width={width || 1} + overscanRowCount={20} + /> + )} + ); }}