Replies posted by Gavin Anderegg
If you will build everything from scratch and use AttributeFilter components, I think that you should be able to change the state of the filter. You can just provide different “filter” prop. It should change its state IMHO. If you would use DashboardComponent I mentioned to handle your filters rendering and state, you can issue command to the component to change their state. For example this one that changes existing attribute filter https://github.com/gooddata/gooddata-ui-sdk/blob/master/libs/sdk-ui-dashboard/src/model/commands/filters.ts#L329. Perfect! Thanks for your help on this. I’m still trying to understand the platform and may come back with more questions, but this was very helpful.Thanks again!
Another person working on this project pointed out to me that I might just be able to update `this.state.filter` inside of the filter component’s parent based on this code: https://sdk.gooddata.com/gooddata-ui/docs/7.7.0/attribute_filter_component.html#handle-the-change-of-the-value-selection-in-the-filterDoes that seem reasonable? It would be preferable to use GoodData.UI, as we’d like to have more control over the dashboard.Thanks!
GoodData.UI framework is for building of application via React. You can build your own filters and dashboards and connect everything together and change them in any way you want. However, you don’t need to build dashboard with layouting and other stuff from scratch. You can use Dashboard component (https://sdk.gooddata.com/gooddata-ui/docs/dashboard_intro.html) to render existing GoodData analytical dashboard (KPI dashboard) in your React app and can interact directly with it. That should add possibility to change filters. Hi Mort, thanks for this.What we’re trying to do is allow users to be able to access pre-defined filters, and also for them to be able to save their own filter sets. For example a pre-defined filter set could change the state of five different filters so it shows users a particular view of the data. Or, users could update several filters themselves and we want a way to record the current filter set, save that with a name, and allow the user to choose that exact filt
Hi Mort,Thanks for following up!I just have a few questions based on this, as I’m still trying to understand the platform:I’m hoping to use the native filters (the ones provided by the GoodData dashboard building UI). The docs you linked to say: “The filter configuration overrides any filters that the dashboard may already have, such as existing attribute and date filters, URL filters, previous filter configuration, and so on.” That maybe sounds like it wouldn’t update the display of those filters inside the dashboard. Do you know how existing filter UIs are affected by this? The docs also mention “To add a new filter, you must be in the Edit mode.” I’m not clear what’s meant by “Edit mode” here. Are these calls possible to run in a view-only context for the end user? The type of embedded filter described here is different than the React components from GoodData.UI. Do you know if the API you linked to would also work with forms included via GoodData.UI? This is a minor point, but I’m
Already have an account? Login
Login to the community
Sign in with your community account. This is different than your login to your GoodData account. Don't have a community login? Create an account
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.