Hello all, I am trying to apply an attribute filte...
# gd-beginners
s
Hello all, I am trying to apply an attribute filter to the dashboard component? Based on the documentation here - https://sdk.gooddata.com/gooddata-ui-apidocs/v8.11.0/docs/sdk-ui-dashboard.applyattributefilter.html How do I find the value for the
filterLocalId
? Also, is it possible to hide the filter dropdown while rendering the dashboard component?
j
Hi Shashank. Regarding the
filterLocalId
, I am not sure. I will ask around and let you know as soon as I can.
I think using https://sdk.gooddata.com/gooddata-ui-apidocs/v8.11.0/docs/sdk-ui-dashboard.selectfiltercontextdefinition.html should help. Inside of the filter context, the filter has a unique ID that the method above should accept.
👍 1
👀 1
s
Thank you @Jan Rehanek I will take a look
j
That selector returns this type: https://github.com/gooddata/gooddata-ui-sdk/blob/master/libs/sdk-model/src/dashboard/filterContext.ts#L211. Going a bit deeper, the
IDashboardAttributeFilter
interface has:
Copy code
/**
         * Identifier of the filter which is valid in the scope of the filter context
         */
        localIdentifier?: string;
localIdentifier
would be what you want to get.