superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From michel...@apache.org
Subject [incubator-superset] 05/08: [dashboard] click tab anchor link (#7640)
Date Sat, 08 Jun 2019 01:00:04 GMT
This is an automated email from the ASF dual-hosted git repository.

michellet pushed a commit to branch release--0.33
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git

commit 33d9032b9dd0e3ea725e73b0769ad0d9f4e0e754
Author: Grace Guo <grace.guo@airbnb.com>
AuthorDate: Mon Jun 3 16:57:21 2019 -0700

    [dashboard] click tab anchor link (#7640)
    
    
    (cherry picked from commit f99ae1ad247298c8b8df3721768f69b13152aef0)
---
 superset/assets/src/components/AnchorLink.jsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/superset/assets/src/components/AnchorLink.jsx b/superset/assets/src/components/AnchorLink.jsx
index b33ee60..dac5e25 100644
--- a/superset/assets/src/components/AnchorLink.jsx
+++ b/superset/assets/src/components/AnchorLink.jsx
@@ -66,8 +66,7 @@ class AnchorLink extends React.PureComponent {
   }
 
   handleClickAnchorLink(ev) {
-    ev.preventDefault();
-    history.pushState(null, null, `#${this.props.anchorLinkId}`);
+    ev.stopPropagation();
   }
 
   render() {
@@ -76,6 +75,7 @@ class AnchorLink extends React.PureComponent {
       <span
         className="anchor-link-container"
         id={anchorLinkId}
+        onClick={this.handleClickAnchorLink}
       >
         {showShortLinkButton &&
         <URLShortLinkButton


Mime
View raw message