From defc243ccee024b8441bec07e34a25d8cd975b91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=B6disch=2C=20Alexander?= Date: Tue, 17 Jun 2025 11:11:53 +0200 Subject: [PATCH 1/2] fix: hide pagination query params if pagination mode is set to none MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Vödisch, Alexander --- .changeset/open-seas-ring.md | 5 +++++ plugins/catalog-react/src/hooks/useEntityListProvider.tsx | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .changeset/open-seas-ring.md diff --git a/.changeset/open-seas-ring.md b/.changeset/open-seas-ring.md new file mode 100644 index 0000000000..8367d3c76b --- /dev/null +++ b/.changeset/open-seas-ring.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-react': patch +--- + +fix: hide pagination query params if pagination mode is set to none diff --git a/plugins/catalog-react/src/hooks/useEntityListProvider.tsx b/plugins/catalog-react/src/hooks/useEntityListProvider.tsx index 560e2ba987..56af7e9a73 100644 --- a/plugins/catalog-react/src/hooks/useEntityListProvider.tsx +++ b/plugins/catalog-react/src/hooks/useEntityListProvider.tsx @@ -346,7 +346,11 @@ export const EntityListProvider = ( ignoreQueryPrefix: true, }); const newParams = qs.stringify( - { ...oldParams, filters: queryParams, cursor, offset, limit }, + { + ...oldParams, + filters: queryParams, + ...(paginationMode === 'none' ? {} : { cursor, limit, offset }), + }, { addQueryPrefix: true, arrayFormat: 'repeat' }, ); const newUrl = `${window.location.pathname}${newParams}`; From bb21c824ddee9c4c7e56b55d7868af100d23fa54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20V=C3=B6disch?= <37340862+alexvoedi@users.noreply.github.com> Date: Tue, 15 Jul 2025 10:29:47 +0200 Subject: [PATCH 2/2] Update .changeset/open-seas-ring.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ben Lambert Signed-off-by: Alexander Vödisch <37340862+alexvoedi@users.noreply.github.com> --- .changeset/open-seas-ring.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/open-seas-ring.md b/.changeset/open-seas-ring.md index 8367d3c76b..d8249f940c 100644 --- a/.changeset/open-seas-ring.md +++ b/.changeset/open-seas-ring.md @@ -2,4 +2,4 @@ '@backstage/plugin-catalog-react': patch --- -fix: hide pagination query params if pagination mode is set to none +hide pagination `queryparams` if pagination mode is set to none