Hello, I'm embedding a dashboard in a react app th...
# gooddata-ui
s
Hello, I'm embedding a dashboard in a react app thanks to
@gooddata/sdk-ui-dashboard
I've just noticed today that "sort insight" isn't working in the embedded dashboard but is actually working on the gooddata website. Exemple, i chose to sort an pie insight by the values in alphabetical order, it is working in the gooddata website but not in the embedded react dashboard. Is there a configuration somewhere to make it work? is it a known limitation? i can't find anything in the documentation Best
j
Hi Simon, For the start, could you please confirm what SDK version are you using?
👋 1
s
Copy code
"@gooddata/sdk-backend-tiger": "^9.1.0",
    "@gooddata/sdk-ui-dashboard": "^9.1.0",
let met know if i can offer more informations to help debug this issue 🙂
f
Hi Simon, we are checking internally for this one (and also your other recent question). A member of the team will be back with a reply when they are able, so hang in there!
r
Hi there Simon, Radek from the GoodData technical team, looking into both this and the display toggle question 🙂 Will come back to you promptly!
s
thank you Radek, let me know if I can help
r
Is there anything extra you might be doing outside of setting the sort on the Dashboard and then embedding it via the Dashboard component? Any extra props/config passed maybe? I tried to replicate, but the sort is working as expected on my side, so I'm trying to make sure I'm not missing anything 🙂
s
hi there. there is nothing unusual, here are the props:
Copy code
const GoodDataDashboardConfig: DashboardConfig = {
    isReadOnly: true,
    mapboxToken,
    menuButtonItemsVisibility: {
      pdfExportButton: false,
      saveAsNewButton: false,
    },
    settings: {
      enableDescriptions: true,
      enableDrilledInsightExport: false,
    },
  };
I tried removing and creating another insight with a sort and it is really not working at my end.
👀 1
@Radek Novacek hello! and sorry for upping this ticket, but is is a bit annoying for us. any hint on how to fix this issue? i can work on a reproducible usecase for you but i'm not sure how? or maybe you'd be more lucky if i share my insightId so that you can check if something is wrong on the back-end side of things? If you have any idea, i'm all ears.
r
Hi Simon, no need to apologize, and sorry for the slow progress on my side! Do you think it would be possible for you to try and upgrade to 9.2.0 and verify? I can bring this up with the SDK engineers, but generally the first recommended step is an upgrade regardless.
s
I will try to upgrade and revert to you, thank you
🤞 1
@Radek Novacek hi again, I tested the 9.2.0 and i'm noticing the same issue. I added some screenshot to be 100% explicit
👀 1
so i'm talking about this configuration that is not forwarded somehow to the embedding
@Radek Novacek I just found that removing the following props to the embed dashboard:
Copy code
settings: {
      enableDescriptions: true,
      enableDrilledInsightExport: false,
    },
actually fixes the issue 😱 the sort is now applied correctly. any idea how i can still pass those props?
so the issue is that I was missing
enableChartsSorting
set to true in the settings props. This is not intuitive because it is the default value, and overriding only two of the settings should not remove the default values, in my opinion. But my bug is fixed, thanks @Radek Novacek for having a look!
🙌 1
👍 1
if anyone ever stumble upon this particular issue of overriding part of the
settings
of a gooddata dashboard config, i found this trick that does the work:
Copy code
const customSettings = {
        commonSettingsWrapper: (settings: ISettings) => ({
          ...(settings ?? {}),
          enableNewHeadline: true,  // add here you extra other settings
        }),
      };
      const res = withCustomWorkspaceSettings(
        /*z your backend factory such as tigerFactory, ..*/,
        customSettings,
      );
🙌 1