diff options
author | stanislavh <stanislav.honcharov@sonarsource.com> | 2023-01-17 11:23:05 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-02-03 14:41:20 +0000 |
commit | b794086251be96e2ae0c24030ece55870d4b3f09 (patch) | |
tree | a60cee0e189410cc0315db21d1d92daa00491c33 | |
parent | 2100644e922a05a559def467737e8dfdd2e32475 (diff) | |
download | sonarqube-b794086251be96e2ae0c24030ece55870d4b3f09.tar.gz sonarqube-b794086251be96e2ae0c24030ece55870d4b3f09.zip |
SONAR-18147 Fix infinite loading in ListFooter
-rw-r--r-- | server/sonar-web/src/main/js/components/controls/ListFooter.tsx | 2 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ListFooter-test.tsx.snap | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/components/controls/ListFooter.tsx b/server/sonar-web/src/main/js/components/controls/ListFooter.tsx index e5ada28e176..32f47f2fe74 100644 --- a/server/sonar-web/src/main/js/components/controls/ListFooter.tsx +++ b/server/sonar-web/src/main/js/components/controls/ListFooter.tsx @@ -43,7 +43,7 @@ export default function ListFooter(props: ListFooterProps) { className, count, loadMore, - loading, + loading = false, needReload, total, pageSize, diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ListFooter-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ListFooter-test.tsx.snap index 0bd10c7be1d..c565c087a57 100644 --- a/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ListFooter-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ListFooter-test.tsx.snap @@ -6,6 +6,7 @@ exports[`should render correctly: default 1`] = ` tabIndex={-1} > <span + aria-busy={false} aria-live="polite" > x_of_y_shown.3.5 @@ -13,12 +14,14 @@ exports[`should render correctly: default 1`] = ` <Button className="spacer-left" data-test="show-more" + disabled={false} onClick={[Function]} > show_more </Button> <DeferredSpinner className="text-bottom spacer-left position-absolute" + loading={false} /> </div> `; @@ -29,12 +32,14 @@ exports[`should render correctly: empty if everything is loaded 1`] = ` tabIndex={-1} > <span + aria-busy={false} aria-live="polite" > x_of_y_shown.5.5 </span> <DeferredSpinner className="text-bottom spacer-left position-absolute" + loading={false} /> </div> `; @@ -45,12 +50,14 @@ exports[`should render correctly: empty if no loadMore nor reload props 1`] = ` tabIndex={-1} > <span + aria-busy={false} aria-live="polite" > x_of_y_shown.3.5 </span> <DeferredSpinner className="text-bottom spacer-left position-absolute" + loading={false} /> </div> `; @@ -61,6 +68,7 @@ exports[`should render correctly: force show load more button if count % pageSiz tabIndex={-1} > <span + aria-busy={false} aria-live="polite" > x_show.60 @@ -68,12 +76,14 @@ exports[`should render correctly: force show load more button if count % pageSiz <Button className="spacer-left" data-test="show-more" + disabled={false} onClick={[Function]} > show_more </Button> <DeferredSpinner className="text-bottom spacer-left position-absolute" + loading={false} /> </div> `; @@ -110,6 +120,7 @@ exports[`should render correctly: reload 1`] = ` tabIndex={-1} > <span + aria-busy={false} aria-live="polite" > x_of_y_shown.3.5 @@ -117,12 +128,14 @@ exports[`should render correctly: reload 1`] = ` <Button className="spacer-left" data-test="reload" + disabled={false} onClick={[MockFunction]} > reload </Button> <DeferredSpinner className="text-bottom spacer-left position-absolute" + loading={false} /> </div> `; @@ -159,12 +172,14 @@ exports[`should render correctly: total undefined 1`] = ` tabIndex={-1} > <span + aria-busy={false} aria-live="polite" > x_show.3 </span> <DeferredSpinner className="text-bottom spacer-left position-absolute" + loading={false} /> </div> `; |