mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Security Solution] Fix incorrect diff display after switching versions (#211901)
**Resolves: https://github.com/elastic/kibana/issues/208085** ## Summary Fixes a bug where incorrect diff was shown for ABC SOLVABLE cases in prebuilt rule upgrade flyout. ### Before https://github.com/user-attachments/assets/cc56e115-24e9-4e6c-b5fc-26704c506137 ### After https://github.com/user-attachments/assets/c27978d7-76ce-4dd4-8b78-4680625cd922 Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
7f5f5a940b
commit
8e3d423572
2 changed files with 2 additions and 1 deletions
|
@ -50,6 +50,7 @@ export function FieldComparisonSide(): JSX.Element {
|
|||
useEffect(() => {
|
||||
if (
|
||||
selectedOption !== VersionsPickerOptionEnum.MyChanges &&
|
||||
prevResolvedValue !== undefined &&
|
||||
!isEqual(prevResolvedValue, resolvedValue)
|
||||
) {
|
||||
setSelectedOption(VersionsPickerOptionEnum.MyChanges);
|
||||
|
|
|
@ -102,7 +102,7 @@ export function getVersionsForComparison(
|
|||
case VersionsPickerOptionEnum.UpdateFromElastic:
|
||||
return hasBaseVersion ? [Version.Base, Version.Target] : [Version.Current, Version.Target];
|
||||
case VersionsPickerOptionEnum.Merged:
|
||||
return [Version.Base, Version.Target];
|
||||
return [Version.Base, Version.Final];
|
||||
default:
|
||||
return assertUnreachable(selectedOption);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue