-
Notifications
You must be signed in to change notification settings - Fork 13.6k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
[native filters] Include native filter values in tabbed dashboard link #17209
Comments
|
Thanks for the awesome description @stevetracvc. I see this marked as an enhancement request and it will be prioritized accordingly. |
Oh I also see you have an initial attempt up there @stevetracvc. If you'd like to open a PR I can help you with getting it forward |
@geido I don't think my fix is the correct way to do it. Rather than having the data bubble up to the component, I'm just snagging it from the browser's URL bar. I couldn't figure out where to correctly get the data, maybe there's something in the core package that can get it instead? I just need it to work ASAP, so my way will work for me for now. |
Back-end part to fix this: #17536 The front-end part will come next. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
If you use a dashboard that has tabs, and also native filters, then the tab link generation doesn't work properly. It excludes the native filter values. When sharing the whole dashboard, things work fine. But when sharing a specific tab, it doesn't.
How to reproduce the bug
Expected results
Like when sharing the dashboard as a whole, when I share a tab I expect all native filter states to also be shared. Ideally, the cross filters will too (another issue I raised: #16580)
Actual results
No native filter states are applied except for default states
Environment
(please complete the following information):
"DASHBOARD_NATIVE_FILTERS": True,
"DASHBOARD_CROSS_FILTERS": True,
"DASHBOARD_FILTERS_EXPERIMENTAL": True,
"ENABLE_EXPLORE_DRAG_AND_DROP": False,
"ENABLE_TEMPLATE_PROCESSING": True,
"DYNAMIC_PLUGINS": True,
"DASHBOARD_RBAC": True,
Checklist
Make sure to follow these steps before submitting your issue - thank you!
Additional context
I'm having a hard time finding where the root cause is, but I have an ugly patch to fix it for now. Here's what I've figured out:
The issue is what's passed to the getDashboardUrl function, as the filters object seems to be empty (unless the dashboard has the old deprecated filter box viz) and there's no dataMask object being passed (which seems to be where native filters are kept).
So, one question is, should that filters object be empty? If so, then why is no dataMask object propagated to these components? I got lost in how a Tab component is actually created, and couldn't figure out how high up dataMask would need to get injected.
My super awful solution is actually in the AnchorLink component, as the window.location.search object appears to have all of the necessary native filters (for now...I'm guessing that might change as the project moves away from URL params for the native filters) and they just need to be extracted. I remove the preselect_filters and native_filters url param parts, then convert it back to a JS object and pass that as the dataMask object. Patch is attached.
The text was updated successfully, but these errors were encountered: