Commit 2b7628c6 by Torkel Ödegaard Committed by GitHub

DashboardLinks: Fixes another issue where dashboard links cause full page reload (#31334)

parent 0a4c3b87
...@@ -40,7 +40,7 @@ export const DashboardLinksDashboard: React.FC<Props> = (props) => { ...@@ -40,7 +40,7 @@ export const DashboardLinksDashboard: React.FC<Props> = (props) => {
<li key={`dashlinks-dropdown-item-${resolvedLink.id}-${index}`}> <li key={`dashlinks-dropdown-item-${resolvedLink.id}-${index}`}>
<a <a
href={resolvedLink.url} href={resolvedLink.url}
target={link.targetBlank ? '_blank' : '_self'} target={link.targetBlank ? '_blank' : undefined}
aria-label={selectors.components.DashboardLinks.link} aria-label={selectors.components.DashboardLinks.link}
> >
{resolvedLink.title} {resolvedLink.title}
...@@ -67,7 +67,7 @@ export const DashboardLinksDashboard: React.FC<Props> = (props) => { ...@@ -67,7 +67,7 @@ export const DashboardLinksDashboard: React.FC<Props> = (props) => {
<a <a
className="gf-form-label gf-form-label--dashlink" className="gf-form-label gf-form-label--dashlink"
href={resolvedLink.url} href={resolvedLink.url}
target={link.targetBlank ? '_blank' : '_self'} target={link.targetBlank ? '_blank' : undefined}
aria-label={selectors.components.DashboardLinks.link} aria-label={selectors.components.DashboardLinks.link}
> >
<Icon name="apps" style={{ marginRight: '4px' }} /> <Icon name="apps" style={{ marginRight: '4px' }} />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment