Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preselect filters #752

Merged
merged 3 commits into from
Jul 13, 2016
Merged

Preselect filters #752

merged 3 commits into from
Jul 13, 2016

Conversation

x4base
Copy link
Contributor

@x4base x4base commented Jul 12, 2016

In a dashboard, after the user select a filter in a filter box, the GET parameter "preselect_filters" in the URL will be updated. The user can bookmark this URL in the browser. So every time the user enter this URL, the user can see filter pre-selected.
For example, go to /caravel/dashboard/world_health/?preselect_filters=%7B%0A%20%20%20%20%222%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22country_name%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22United%20States%22%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%0A%7D , you can see the World's Health Bank Dashboard with the country_name = "United States" chosen in the Region Filter.

@coveralls
Copy link

coveralls commented Jul 12, 2016

Coverage Status

Coverage remained the same at 81.114% when pulling 4babcb3 on x4base:preselect_filters into 18b8e6f on airbnb:master.

var endpoint = parser.pathname + this.querystring();
var endpoint = parser.pathname + this.querystring({
extraFilters: params.extraFilters
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: indent seems off on 236 and 237

@mistercrunch
Copy link
Member

This is a great feature that was on my TODO list. Thanks for tackling it!

@coveralls
Copy link

coveralls commented Jul 13, 2016

Coverage Status

Coverage remained the same at 81.114% when pulling 657f1c0 on x4base:preselect_filters into 18b8e6f on airbnb:master.

@mistercrunch mistercrunch merged commit 8cfe9e9 into apache:master Jul 13, 2016
@vibinsv09
Copy link

Would be great if we can define preselect_filters in the slice/dashboard definition itself

zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 17, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 24, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 25, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 26, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.11.0 labels Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants