From d116025d5bd5f77ff4a7cea69b82f7f2fc85c4be Mon Sep 17 00:00:00 2001 From: Cristiano Rastelli Date: Thu, 16 Oct 2025 13:48:22 +0100 Subject: [PATCH 1/2] added extra info about `@queryFunction` code snippet example --- .../docs/components/pagination/partials/code/how-to-use.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/components/pagination/partials/code/how-to-use.md b/website/docs/components/pagination/partials/code/how-to-use.md index 437c2810580..7d4656130b9 100644 --- a/website/docs/components/pagination/partials/code/how-to-use.md +++ b/website/docs/components/pagination/partials/code/how-to-use.md @@ -120,7 +120,7 @@ If you want the Pagination to change the URL of the page directly (eg. updating /> ``` -where the `@queryFunction` function will be something like this: +where the `@queryFunction` function will be something like this (this is just an example, you will have to adapt the code to how your routing and query parameters are handled, see a reference [here](https://github.com/hashicorp/cloud-ui/blob/f49947bab0422165804049a018a7198f2e8c97e3/engines/role-assignments/addon/components/page/list.gts#L254-L259) or [here](https://github.com/hashicorp/atlas/blob/d6f0feee5a603d16fb331e1d697d12191a9bc1a3/frontend/atlas/app/controllers/v2/organization/workspaces-beta.js#L62C3-L69C4)): ```javascript get demoQueryFunctionNumbered() { @@ -251,7 +251,7 @@ If you want the Pagination to change the URL of the page directly (eg. updating /> ``` -where the `@queryFunction` function will be something like this: +where the `@queryFunction` function will be something like this (this is just an example, you will have to adapt the code to how your routing and query parameters are handled, see a reference [here](https://github.com/hashicorp/cloud-ui/blob/f49947bab0422165804049a018a7198f2e8c97e3/hcp/app/components/page/projects/list.gjs#L149-L165) or [here](https://github.com/hashicorp/atlas/blob/75086ea986e1e15488486996a8d949c4bc68633c/frontend/atlas/app/controllers/v2/organization/settings/policies/index.js#L9-L13)): ```javascript get demoQueryFunctionCompact() { From 4b4521c688df384ab20a2a908b6204f98ae26edb Mon Sep 17 00:00:00 2001 From: Cristiano Rastelli Date: Thu, 16 Oct 2025 14:57:08 +0100 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Dylan Hyun --- .../docs/components/pagination/partials/code/how-to-use.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/components/pagination/partials/code/how-to-use.md b/website/docs/components/pagination/partials/code/how-to-use.md index 7d4656130b9..838b3822046 100644 --- a/website/docs/components/pagination/partials/code/how-to-use.md +++ b/website/docs/components/pagination/partials/code/how-to-use.md @@ -120,7 +120,7 @@ If you want the Pagination to change the URL of the page directly (eg. updating /> ``` -where the `@queryFunction` function will be something like this (this is just an example, you will have to adapt the code to how your routing and query parameters are handled, see a reference [here](https://github.com/hashicorp/cloud-ui/blob/f49947bab0422165804049a018a7198f2e8c97e3/engines/role-assignments/addon/components/page/list.gts#L254-L259) or [here](https://github.com/hashicorp/atlas/blob/d6f0feee5a603d16fb331e1d697d12191a9bc1a3/frontend/atlas/app/controllers/v2/organization/workspaces-beta.js#L62C3-L69C4)): +where the `@queryFunction` function will be something like this (this is just an example, you will have to adapt the code to how your routing and query parameters are handled, see a reference [in Cloud UI](https://github.com/hashicorp/cloud-ui/blob/f49947bab0422165804049a018a7198f2e8c97e3/engines/role-assignments/addon/components/page/list.gts#L254-L259) or [in Atlas](https://github.com/hashicorp/atlas/blob/d6f0feee5a603d16fb331e1d697d12191a9bc1a3/frontend/atlas/app/controllers/v2/organization/workspaces-beta.js#L62C3-L69C4)): ```javascript get demoQueryFunctionNumbered() { @@ -251,7 +251,7 @@ If you want the Pagination to change the URL of the page directly (eg. updating /> ``` -where the `@queryFunction` function will be something like this (this is just an example, you will have to adapt the code to how your routing and query parameters are handled, see a reference [here](https://github.com/hashicorp/cloud-ui/blob/f49947bab0422165804049a018a7198f2e8c97e3/hcp/app/components/page/projects/list.gjs#L149-L165) or [here](https://github.com/hashicorp/atlas/blob/75086ea986e1e15488486996a8d949c4bc68633c/frontend/atlas/app/controllers/v2/organization/settings/policies/index.js#L9-L13)): +where the `@queryFunction` function will be something like this (this is just an example, you will have to adapt the code to how your routing and query parameters are handled, see a reference [in Cloud UI](https://github.com/hashicorp/cloud-ui/blob/f49947bab0422165804049a018a7198f2e8c97e3/hcp/app/components/page/projects/list.gjs#L149-L165) or [in Atlas](https://github.com/hashicorp/atlas/blob/75086ea986e1e15488486996a8d949c4bc68633c/frontend/atlas/app/controllers/v2/organization/settings/policies/index.js#L9-L13)): ```javascript get demoQueryFunctionCompact() {