SectionHeader: Fix "Go to Folder" link not working (#44593)

This commit is contained in:
kay delaney 2022-02-02 15:27:55 +00:00 committed by GitHub
parent 9247848a7b
commit 9e6b9215ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,6 +32,10 @@ export const CollapsableSection: FC<Props> = ({
const styles = useStyles2(collapsableSectionStyles);
const tooltip = `Click to ${open ? 'collapse' : 'expand'}`;
const onClick = (e: React.MouseEvent) => {
if (e.target instanceof HTMLElement && e.target.tagName === 'A') {
return;
}
e.preventDefault();
e.stopPropagation();