stevetracvc edited a comment on issue #17209:
URL: https://github.com/apache/superset/issues/17209#issuecomment-950355654


   ```
   diff --git a/superset-frontend/src/components/AnchorLink/index.jsx 
b/superset-frontend/src/components/AnchorLink/index.jsx
   index 16be622bd..3adec2810 100644
   --- a/superset-frontend/src/components/AnchorLink/index.jsx
   +++ b/superset-frontend/src/components/AnchorLink/index.jsx
   @@ -23,6 +23,7 @@ import { t } from '@superset-ui/core';
    import URLShortLinkButton from 'src/components/URLShortLinkButton';
    import getDashboardUrl from 'src/dashboard/util/getDashboardUrl';
    import getLocationHash from 'src/dashboard/util/getLocationHash';
   +import rison from 'rison';
    
    const propTypes = {
      anchorLinkId: PropTypes.string.isRequired,
   @@ -76,6 +77,13 @@ class AnchorLink extends React.PureComponent {
          showShortLinkButton,
          placement,
        } = this.props;
   +
   +    const urlVals = decodeURIComponent(window.location.search)
   +      .replace(/^\?(preselect_filters=\{.*\})?&?(native_filters=)?/, '')
   +      .replace(/\+/g,  ' ');
   +
   +    const dataMask = (urlVals.length > 0) ? rison.decode(urlVals) : {};
   +
        return (
          <span className="anchor-link-container" id={anchorLinkId}>
            {showShortLinkButton && (
   @@ -84,6 +92,7 @@ class AnchorLink extends React.PureComponent {
                  pathname: window.location.pathname,
                  filters,
                  hash: anchorLinkId,
   +              dataMask,
                })}
                emailSubject={t('Superset chart')}
                emailContent={t('Check out this chart in dashboard:')}
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to