diff options
author | Philippe Perrin <philippe.perrin@sonarsource.com> | 2021-10-20 10:48:08 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-11-09 20:03:16 +0000 |
commit | e03b2bf40be7de4821cdf009c74dffc90b87757b (patch) | |
tree | 0348599747bae1b6e74b52d9efbc8f05013250aa /server/sonar-web/src/main/js/components/hoc | |
parent | e8905886d0e77cc080022dff7e0df79e4823e5de (diff) | |
download | sonarqube-e03b2bf40be7de4821cdf009c74dffc90b87757b.tar.gz sonarqube-e03b2bf40be7de4821cdf009c74dffc90b87757b.zip |
SONAR-15498 Manual selection of project's branches for portfolio
Display portfolio's children branch information and group issues by project and branch
Diffstat (limited to 'server/sonar-web/src/main/js/components/hoc')
-rw-r--r-- | server/sonar-web/src/main/js/components/hoc/withKeyboardNavigation.tsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/components/hoc/withKeyboardNavigation.tsx b/server/sonar-web/src/main/js/components/hoc/withKeyboardNavigation.tsx index 9288e336bbb..cebddd9aa14 100644 --- a/server/sonar-web/src/main/js/components/hoc/withKeyboardNavigation.tsx +++ b/server/sonar-web/src/main/js/components/hoc/withKeyboardNavigation.tsx @@ -20,6 +20,7 @@ import key from 'keymaster'; import * as React from 'react'; import PageActions from '../../components/ui/PageActions'; +import { getComponentMeasureUniqueKey } from '../../helpers/component'; import { getWrappedDisplayName } from './utils'; export interface WithKeyboardNavigationProps { @@ -72,7 +73,12 @@ export default function withKeyboardNavigation<P>( getCurrentIndex = () => { const { selected, components = [] } = this.props; - return selected ? components.findIndex(component => component.key === selected.key) : -1; + return selected + ? components.findIndex( + component => + getComponentMeasureUniqueKey(component) === getComponentMeasureUniqueKey(selected) + ) + : -1; }; skipIfFile = (handler: () => void) => { |