Skip to content

[8.18] [ML] Anomaly Explorer: Prevent crash on anomaly table filter (#213075)#213498

Merged
kibanamachine merged 1 commit intoelastic:8.18from
kibanamachine:backport/8.18/pr-213075
Mar 7, 2025
Merged

[8.18] [ML] Anomaly Explorer: Prevent crash on anomaly table filter (#213075)#213498
kibanamachine merged 1 commit intoelastic:8.18from
kibanamachine:backport/8.18/pr-213075

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 8.18:

Questions ?

Please refer to the Backport tool documentation

…#213075)

Fix for: elastic#212569
From what I found, the issue was with the `useUrlStateService` after
changes introduced in elastic#203224,
which made the service more generic.

When filtering causes the `explorer` to remount the `AnomaliesTable`,
pagination state updates are triggered before the effect that sets
`setCallback.current` executes.

Initializing the ref with `setState` ensures its availability from the
first render.

https://github.com/user-attachments/assets/d1aa8409-56e5-4632-a5f2-82350b877db6
(cherry picked from commit 0210468)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Mar 6, 2025
@kibanamachine kibanamachine enabled auto-merge (squash) March 6, 2025 23:24
@kibanamachine kibanamachine merged commit c1687f8 into elastic:8.18 Mar 7, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants