Hi! I have a question regarding dashboard filters...
# gooddata-ui
e
Hi! I have a question regarding dashboard filters. I'm using the
<Dashboard />
component from
@gooddata/sdk-ui-dashboard
in a React app to embed a dashboard by reference. I want to be able to render the dashboard with different filters. Ideally, my goal is to be able to capture the filter changes and store them somewhere - possibly in the URL -, then use those stored filters to embed the dashboard at any time in the exact same state. I'm happy to give more details if needed. Any help is appreciated, thanks!
i
Hi Emir, May I know what version of SDK are you working with, please? Also, are you looking for some "saved view" option or are you more interested on some filtering on demand/peer embedded solution?
e
Hi, it's
"@gooddata/sdk-ui-dashboard": "^10.5.1"
. I want to embed a dashboard with filters that are set while rendering. I've implemented a similar logic using the <InsightView /> component via its
filters
property and passing it a value. I couldn't find the same property for the dashboard component so just asking how I could implement the same behavior.
r
Heya Emir, Radek from the GoodData Technical team here, this has been sent our way 🙂 There's an example available on this page using dispatch commands to set the filters, that's the closest equivalent to the InsightView filters property!
🙌 1
e
Hi Radek, thanks for the response!! I will look into it and update here if it does the trick!
Hi Radek, just giving update that the implementation in the example you gave helped a lot and using a part of it solved the issue I had. Thank you for your help and time!
🙌 2