You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if anyone else has encountered this issue.
Have 2 buttons on website, clicking each one results in different url sent to TableauReport via props.
isReportChanged in componentWillReceiveProps(nextProps) is correctly set to true, but the initTableau() called inside ends up using the old url instead of the new one from nextProps.
Result is that when url1 changes to url2, old report from url1 reloads. If url1 is selected, then report from url2 is loaded, always lagging behind by showing the previous url if it has changed.
My quickfix: give initTableau an optional parameter, say customUrl with default value set to false.
If customUrl is not false, then set vizUrl to customUrl.
When calling initTableau from componentWillReceiveProps(), call initTableau with nextProps.url so it will use customUrl instead of the old url from getUrl().
Hope this helps someone.
Edit: Forgot to mention, this causes later requested reports to become invisible for some reason (visibility hidden, height and width 0), so be sure to use the options prop to fix that.
The text was updated successfully, but these errors were encountered:
Not sure if anyone else has encountered this issue.
Have 2 buttons on website, clicking each one results in different url sent to TableauReport via props.
isReportChanged in componentWillReceiveProps(nextProps) is correctly set to true, but the initTableau() called inside ends up using the old url instead of the new one from nextProps.
Result is that when url1 changes to url2, old report from url1 reloads. If url1 is selected, then report from url2 is loaded, always lagging behind by showing the previous url if it has changed.
My quickfix: give initTableau an optional parameter, say customUrl with default value set to false.
If customUrl is not false, then set vizUrl to customUrl.
When calling initTableau from componentWillReceiveProps(), call initTableau with nextProps.url so it will use customUrl instead of the old url from getUrl().
Hope this helps someone.
Edit: Forgot to mention, this causes later requested reports to become invisible for some reason (visibility hidden, height and width 0), so be sure to use the options prop to fix that.
The text was updated successfully, but these errors were encountered: