Hi Michael,
Thank you for noticing this, appreciated. We will correct the code snippet within the article.
m
Michael Serres
08/01/2022, 8:12 AM
Also, putting a default value for filter doesn't work
Gives Error loading filter on screen:
<AttributeFilterButton filter={newPositiveAttributeFilter(Md.MthCode, ["2021 12"])} onApply={onApply} />
Loads correctly:
<AttributeFilterButton filter={newPositiveAttributeFilter(Md.MthCode, [])} onApply={onApply} />
j
Jan Rehanek
08/01/2022, 9:11 AM
Hi Michael - Could I see the text of the error? Also, important question: Are you using GoodData.CN (Docker image/Helmchart) as your backend or the hosted platform?
m
Michael Serres
08/01/2022, 12:08 PM
Hi, I'm using the hosted platform from the react starter with gd.ui. The component initially renders, I see the value as default but then error appear on screen. Need to check again with console if you need more info.
j
Jan Rehanek
08/01/2022, 12:17 PM
Please have a look at https://gooddataconnect.slack.com/archives/C01UR5BGAHY/p1653381960033109 - mainly the last few anwers. The key part is that it is not possible to use a list of values with the hosted backend - only a list of uris. If you use values, the filter errors out upon the first refresh of the React component.
m
Michael Serres
08/01/2022, 6:20 PM
Ok, I'll fall back to using AttributeFilter, thanks. Was hoping is was fixed in 8.10.0.