[8.16] [Security Solution] Adds callback onUpdatePageIndex to get current pageIndex in Unified Data table (#201240)#202349
Merged
logeekal merged 2 commits intoelastic:8.16from Dec 2, 2024
Conversation
…`pageIndex` in Unified Data table (elastic#201240) ## Summary Handles resolution for - Notes fetching data for all Timeline Records which leads to performance issues. - elastic#201330 ## Issue - Notes fetching data for all Timeline Records Currently, there was no way for consumer of `UnifiedDataGrid` to get the current `pageIndex`. Security Solution needs to get the current `pageIndex` so the items on the current page can be calculated. @elastic/kibana-data-discovery , please let us know if you have any opinion here. This results in notes being fetched for all Timeline Records which means minimum of 500 records and if user has queries 5000 records ( for example ), a request will be made to query notes for all those 5000 notes which leads to performance issue and sometimes error as shown below:  ## 👨💻 Changes This adds attribute `pageIndex` to timeline state. ```javascript { "pageIndex": number } ``` `pageIndex` helps with getting the events for that particular page. ## 🟡 Caveat - Currently this `pageIndex` is shared between Query and EQL tabs which can lead to wonky behavior at time. - Additionally, as of now table maintains its own page index and consumer component cannot effect the `pageIndex` of the UnifiedDataGrid. (cherry picked from commit de9d546) # Conflicts: # x-pack/plugins/security_solution/public/timelines/components/timeline/body/unified_timeline_body.tsx # x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/eql/index.tsx # x-pack/plugins/security_solution/public/timelines/containers/index.test.tsx
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Public APIs missing comments
Async chunks
History
|
PhilippeOberti
approved these changes
Dec 2, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto8.16:onUpdatePageIndexto get currentpageIndexin Unified Data table (#201240)Questions ?
Please refer to the Backport tool documentation