Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Cannot use useReport in typescript-react app. #594

Open
NandanSpeedshield opened this issue Mar 30, 2022 · 0 comments
Open

[BUG] Cannot use useReport in typescript-react app. #594

NandanSpeedshield opened this issue Mar 30, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@NandanSpeedshield
Copy link

When useReport is used inside the useEffect, it throws an error mentioning about the wrong embed-type. But useReport works well with JSX file.
Expected type of Config {
type: EmbedType;
tokenType: TokenType;
accessToken: string;
embedUrl: string;
pageName: string;
groupId: string;
visualName: string;
extraSettings: any;
permissions: Permissions;
id: string;
reportMode: ReportModes;
datasetId: string;
pageView: PageView;
dashboardId: string;
}

Config type that works with JSX
Config{
embedType: string,
tokenType: string,
accessToken:string,
embedUrl:string
embedId: string,
reportMode: "View",
permissions: "All",
extraSettings: {
filterPaneEnabled: false,
navContentPaneEnabled: false
},
pageView: "fitToWidth",
}

@NandanSpeedshield NandanSpeedshield added the bug Something isn't working label Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants