forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security Solution] Exceptions flyout refreshes when it regains focus…
…, causing configured fields to get cleared (elastic#166550) (elastic#172666) ## Summary Addresses elastic#166550 These changes fix the issue where user can experience data loss while adding rule exceptions. The main issue is that we keep conditions state inside the child component `ExceptionsConditions` which is rendered conditionally based on `isLoading` flag. This flag changes when `useQuery` data gets stale and refetching is triggered. In this case we would remove `ExceptionsConditions` component while loading data and re-create it after. Since conditions state stored inside `ExceptionsConditions` we will lose it. This is a quick fix to make sure our users are not frustrated. The state refactoring will come separately in the next release when we are going to address the main issue elastic/security-team#8197 To reproduce: 1. Open "add rule exception" flyout 2. Add exception conditions 3. Wait for 5 minutes (to avoid waiting this long you can use [this approach](elastic#166550 (comment))) 4. Remove focus from the page (by switching to another app or navigating to a different tab in a browser) 5. Focus on the page again When you are back to the page all exception conditions should still be there. --------- Co-authored-by: Vitalii Dmyterko <[email protected]>
- Loading branch information
Showing
2 changed files
with
104 additions
and
98 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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