Merge pull request #30292 from alexvoedi/master

fix: hide pagination query params if pagination mode is set to none
This commit is contained in:
Ben Lambert
2025-07-29 09:50:37 +02:00
committed by GitHub
2 changed files with 10 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-react': patch
---
hide pagination `queryparams` if pagination mode is set to none
@@ -346,7 +346,11 @@ export const EntityListProvider = <EntityFilters extends DefaultEntityFilters>(
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}`;