superset icon indicating copy to clipboard operation
superset copied to clipboard

Dashboard filters do not persist on page refresh

Open smokemonster99 opened this issue 7 years ago • 12 comments

A clear and concise description of what the bug is. Dashboard filters do not persist on page refresh.

Expected results

The page reloads with the same values for filters

Actual results

The filters reset to defaults.

Screenshots

If applicable, add screenshots to help explain your problem.

How to reproduce the bug

  1. Load a dashboard which contains filters
  2. Use dropdown to select one the the filters and hit apply
  3. Refresh the browser
  4. Previously applied filter does not get applied (filters not retained)

Environment

(please complete the following information):

  • superset version: 33.0 (and 26.3)
  • python version: 3.6.8
  • node.js version: v10.16.0
  • npm version: 6.9.0

Checklist

Make sure these boxes are checked before submitting your issue - thank you!

  • [ x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • [x] I have reproduced the issue with at least the latest released version of superset.
  • [ ] I have checked the issue tracker for the same issue and I haven't found one similar. Issue #5628 is same but the PR does not seem to address this issue., only dashboard refresh interval issue.

Additional context

I am also open to a workaround or change in config that would enable this desired behavior

Add any other context about the problem here.

smokemonster99 avatar Aug 23 '19 16:08 smokemonster99

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.94. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

issue-label-bot[bot] avatar Aug 23 '19 16:08 issue-label-bot[bot]

After applying filters: Press the arrow next to "Edit dashboard". "Save as"

That should do it.

kaspergaj avatar Aug 26 '19 12:08 kaspergaj

@kaspergaj Thanks for the reply but that is not going to solve my issue as I do not want the dashboard to permanently change. If the browser url would change when I apply the filters, then I would not lose my filters (and have to reapply them) if I refresh the page. It also helps in being able to share filtered dashboard links using browser url.

smokemonster99 avatar Aug 26 '19 14:08 smokemonster99

How about the share dashboard button under save as? That should give you a link. When I follow that link it keeps the selected filters.

kaspergaj avatar Aug 27 '19 07:08 kaspergaj

Yes but this does not work on v0.26.3.

smokemonster99 avatar Aug 29 '19 14:08 smokemonster99

Desperately need this feature. I have around 15 filters in my dashboard and would like to share the dashboard with others without having to save a copy of dashboard. The dashboard also looses filters on refresh which I have to due to web server timeout errors.

It would be great if filter values are added to Dashboard URL like it does in explore view.

avinasht1 avatar Sep 25 '19 22:09 avinasht1

@graceguo-supercat

mistercrunch avatar Sep 26 '19 03:09 mistercrunch

oh @avinasht1 , just use the "share dashboard" link, it saves the filter context Screen Shot 2019-09-25 at 9 40 38 PM

mistercrunch avatar Sep 26 '19 04:09 mistercrunch

I just saw this thread. Max is right:

  1. apply filter on your dashboard,
  2. open dropdown menu and choose Share dashboard, it will generate a shorten url. this url encode current selected filter values. This way you don't have to save another copy of dashboard, but your users need to keep a copy of shorten url, otherwise they will lost the filter values in the url parameters.

Or you can

  1. apply filter on your dashboard,
  2. open dropdown menu and choose Save as => save as another copy. This way the selected filter values are stored in dashboard's meta data. Dashboard users can open dashboard by id, and it will load preselected values.

graceguo-supercat avatar Sep 26 '19 05:09 graceguo-supercat

Hi, I see the work around options above but is there a plan to add a feature so the filters are automatically added to the url when selected? This would prevent our users from losing the filters they've applied when refreshing the page.

Matthew-Byrne avatar Oct 29 '19 10:10 Matthew-Byrne

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

stale[bot] avatar Dec 28 '19 10:12 stale[bot]

It doesn't seems to be fixed yet.. Any solution or workaround?

RavazziniAndrea avatar Apr 27 '22 15:04 RavazziniAndrea