diff options
author | Stas Vilchik <stas-vilchik@users.noreply.github.com> | 2017-04-24 10:36:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-24 10:36:38 +0200 |
commit | c5471380870c76f5d714325c29cd0964a2fb324f (patch) | |
tree | 1fa6db9cb59be023076d49da97d25b8f50c7bfe5 /server/sonar-web/src/main/js/components/common/LocationIndex.js | |
parent | 46337152f44def08a125acd8460007cfdd210de3 (diff) | |
download | sonarqube-c5471380870c76f5d714325c29cd0964a2fb324f.tar.gz sonarqube-c5471380870c76f5d714325c29cd0964a2fb324f.zip |
SONAR-9067 Display multiple flows in the issues list (#1969)
Diffstat (limited to 'server/sonar-web/src/main/js/components/common/LocationIndex.js')
-rw-r--r-- | server/sonar-web/src/main/js/components/common/LocationIndex.js | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/server/sonar-web/src/main/js/components/common/LocationIndex.js b/server/sonar-web/src/main/js/components/common/LocationIndex.js index 03b74ee0c84..ecc4027b124 100644 --- a/server/sonar-web/src/main/js/components/common/LocationIndex.js +++ b/server/sonar-web/src/main/js/components/common/LocationIndex.js @@ -29,19 +29,13 @@ type Props = { }; export default function LocationIndex(props: Props) { - const clickAttributes = props.onClick - ? { - onClick: props.onClick, - role: 'button', - tabIndex: 0 - } - : {}; + const { children, onClick, selected, ...other } = props; + const clickAttributes = onClick ? { onClick, role: 'button', tabIndex: 0 } : {}; + // put {...others} because Tooltip sets some event handlers return ( - <div - className={classNames('location-index', { selected: props.selected })} - {...clickAttributes}> - {props.children} + <div className={classNames('location-index', { selected })} {...clickAttributes} {...other}> + {children} </div> ); } |