Skip to content

Commit

Permalink
UIPQB-50: Add 'in-progress' handling to plugin-query-builder
Browse files Browse the repository at this point in the history
  • Loading branch information
UladzislauKutarkin committed Oct 3, 2023
1 parent dc9223b commit a1845a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/QueryBuilder/ResultViewer/ResultViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const ResultViewer = ({
onPreviewShown,
isPreviewLoading,
additionalControls,
refreshInProgress,
}) => {
const intl = useIntl();

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -202,4 +203,5 @@ ResultViewer.propTypes = {
contentQueryOptions: PropTypes.object,
contentQueryKeys: PropTypes.arrayOf(PropTypes.string),
additionalControls: PropTypes.element,
refreshInProgress: PropTypes.bool,
};
1 change: 1 addition & 0 deletions src/QueryBuilder/ResultViewer/ResultViewer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const renderResultViewer = (props) => (
onSetDefaultVisibleColumns={setVisibleColumns}
onSetDefaultColumns={setColumns}
height={300}
refreshInProgress={false}
{...props}
/>
</QueryClientProvider>
Expand Down

0 comments on commit a1845a6

Please sign in to comment.