From 252a6eb45f67e0b750047290f0b8f92a638609ae Mon Sep 17 00:00:00 2001 From: UladzislauKutarkin <72550466+UladzislauKutarkin@users.noreply.github.com> Date: Wed, 4 Oct 2023 19:30:54 +0400 Subject: [PATCH] UIPQB-50: Add 'in-progress' handling to plugin-query-builder (#62) --- src/QueryBuilder/ResultViewer/ResultViewer.js | 4 +++- src/QueryBuilder/ResultViewer/ResultViewer.test.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/QueryBuilder/ResultViewer/ResultViewer.js b/src/QueryBuilder/ResultViewer/ResultViewer.js index 445bef5b..5e5ffb26 100644 --- a/src/QueryBuilder/ResultViewer/ResultViewer.js +++ b/src/QueryBuilder/ResultViewer/ResultViewer.js @@ -30,6 +30,7 @@ export const ResultViewer = ({ onPreviewShown, isPreviewLoading, additionalControls, + refreshInProgress, }) => { const intl = useIntl(); @@ -61,7 +62,7 @@ export const ResultViewer = ({ contentQueryKeys, }); - const isListLoading = isContentDataFetching || isContentDataLoading || isEntityTypeLoading; + const isListLoading = isContentDataFetching || isContentDataLoading || isEntityTypeLoading || refreshInProgress; const currentRecordsCount = contentData?.length || 0; // set visible by default columns once @@ -202,4 +203,5 @@ ResultViewer.propTypes = { contentQueryOptions: PropTypes.object, contentQueryKeys: PropTypes.arrayOf(PropTypes.string), additionalControls: PropTypes.element, + refreshInProgress: PropTypes.bool, }; diff --git a/src/QueryBuilder/ResultViewer/ResultViewer.test.js b/src/QueryBuilder/ResultViewer/ResultViewer.test.js index 8ade157b..8448c4ed 100644 --- a/src/QueryBuilder/ResultViewer/ResultViewer.test.js +++ b/src/QueryBuilder/ResultViewer/ResultViewer.test.js @@ -25,6 +25,7 @@ const renderResultViewer = (props) => ( onSetDefaultVisibleColumns={setVisibleColumns} onSetDefaultColumns={setColumns} height={300} + refreshInProgress={false} {...props} />