Skip to content

Commit fe645be

Browse files
[9.2] [Security Solution] [Intelligence] Table Pagination Not Working as Expected (#241108) (#241298)
# Backport This will backport the following commits from `main` to `9.2`: - [[Security Solution] [Intelligence] Table Pagination Not Working as Expected (#241108)](#241108) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Agustina Nahir Ruidiaz","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-10-30T14:29:50Z","message":"[Security Solution] [Intelligence] Table Pagination Not Working as Expected (#241108)\n\n## Summary\n\nCloses: https://github.com/elastic/kibana/issues/228450\n\nI updated the `from` parameter to multiply `pageIndex * pageSize`\nbecause Elasticsearch’s [from represents the number of documents to\nskip, not the page\nnumber](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results).\n\nPreviously, we were sending `from = pageIndex`, which only skipped one\ndocument per page instead of a full page of results. That’s why moving\nto the next page only shifted the list by one item instead of showing a\ncompletely new set of results.\n\nThe fix ensures each new page starts after the correct number of items\n(e.g. page 2 starts after 25 items when the page size is 25).\n\n\n**Before** \n\n\nhttps://github.com/user-attachments/assets/0eb33f27-a88b-4988-9b5c-89c232420f5c\n\n**After**\n\n\nhttps://github.com/user-attachments/assets/a03a436d-f034-4d49-bf13-da72734ee43d\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"378ca1a84cbb64a18fa7de2777756c4f154c3dfd","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team: SecuritySolution","Team:Threat Hunting:Investigations","backport:all-open","ci:cloud-deploy","v9.3.0"],"title":"[Security Solution] [Intelligence] Table Pagination Not Working as Expected","number":241108,"url":"https://github.com/elastic/kibana/pull/241108","mergeCommit":{"message":"[Security Solution] [Intelligence] Table Pagination Not Working as Expected (#241108)\n\n## Summary\n\nCloses: https://github.com/elastic/kibana/issues/228450\n\nI updated the `from` parameter to multiply `pageIndex * pageSize`\nbecause Elasticsearch’s [from represents the number of documents to\nskip, not the page\nnumber](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results).\n\nPreviously, we were sending `from = pageIndex`, which only skipped one\ndocument per page instead of a full page of results. That’s why moving\nto the next page only shifted the list by one item instead of showing a\ncompletely new set of results.\n\nThe fix ensures each new page starts after the correct number of items\n(e.g. page 2 starts after 25 items when the page size is 25).\n\n\n**Before** \n\n\nhttps://github.com/user-attachments/assets/0eb33f27-a88b-4988-9b5c-89c232420f5c\n\n**After**\n\n\nhttps://github.com/user-attachments/assets/a03a436d-f034-4d49-bf13-da72734ee43d\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"378ca1a84cbb64a18fa7de2777756c4f154c3dfd"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/241108","number":241108,"mergeCommit":{"message":"[Security Solution] [Intelligence] Table Pagination Not Working as Expected (#241108)\n\n## Summary\n\nCloses: https://github.com/elastic/kibana/issues/228450\n\nI updated the `from` parameter to multiply `pageIndex * pageSize`\nbecause Elasticsearch’s [from represents the number of documents to\nskip, not the page\nnumber](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/paginate-search-results).\n\nPreviously, we were sending `from = pageIndex`, which only skipped one\ndocument per page instead of a full page of results. That’s why moving\nto the next page only shifted the list by one item instead of showing a\ncompletely new set of results.\n\nThe fix ensures each new page starts after the correct number of items\n(e.g. page 2 starts after 25 items when the page size is 25).\n\n\n**Before** \n\n\nhttps://github.com/user-attachments/assets/0eb33f27-a88b-4988-9b5c-89c232420f5c\n\n**After**\n\n\nhttps://github.com/user-attachments/assets/a03a436d-f034-4d49-bf13-da72734ee43d\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"378ca1a84cbb64a18fa7de2777756c4f154c3dfd"}}]}] BACKPORT--> Co-authored-by: Agustina Nahir Ruidiaz <[email protected]>
1 parent 2f0bc8f commit fe645be

File tree

1 file changed

+1
-1
lines changed
  • x-pack/solutions/security/plugins/security_solution/public/threat_intelligence/modules/indicators/services

1 file changed

+1
-1
lines changed

x-pack/solutions/security/plugins/security_solution/public/threat_intelligence/modules/indicators/services/fetch_indicators.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const createFetchIndicators =
6464

6565
const searchRequestBody = {
6666
size: pagination.pageSize,
67-
from: pagination.pageIndex,
67+
from: pagination.pageIndex * pagination.pageSize,
6868
fields: [{ field: '*', include_unmapped: true } as const],
6969
sort: sorting.map(({ id, direction }) => ({ [id]: direction })),
7070
...sharedParams,

0 commit comments

Comments
 (0)