Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello i need some help integrating qlik into my react application.
I am using @qlik/react-embeed and everything is working fine but i have issues figuring out how to provide initialSelections in react-embeed.
For example:
I have a sheet with some chart and on my react-application when user clicks on a table row, i want to show him chart for that specific user, meaning i have to provide an initialSelection to my qlik sheet.
Now in the documentation i see it exists, but the example is in web-components, not react-embeed and i dont know how to integrate it in react
<qlik-initial-selections app-id="a51a902d-76a9-4c53-85d2-066b44240146">
<field state="comparison" name="Product Sub Group Desc" values="Hot Dogs;Fresh Fruit"></field>
<field state="comparison" name="AccountDesc" values="Sales;Cost of goods sold"></field>
</qlik-initial-selections>
Here is my current integration code:
import React from 'react';
import { QlikEmbed as QlikEmbedAnalytics, QlikEmbedConfig, HostConfig } from '@qlik/embed-react';
interface QlikEmbedProps {
appId: string;
sheetId: string;
}
const hostConfig: HostConfig = {
authType: 'Oauth2',
clientId: '<client-id>',
// clientSecret,
accessTokenStorage: 'session',
redirectUri: 'http://localhost:3000/oauth-callback.html',
// apiKey: import.meta.env.VITE_QLIK_API_KEY,
host: import.meta.env.VITE_QLIK_HOST,
};
const QlikEmbed: React.FC<QlikEmbedProps> = ({ appId, sheetId }) => {
return (
<QlikEmbedConfig.Provider value={hostConfig}>
<QlikEmbedAnalytics
ui="analytics/sheet"
context={{
interactions: { active: true, select: true, edit: false, passive: false },
}}
appId={appId}
sheetId={sheetId}
theme="WunderMobilityTheme"
/>
</QlikEmbedConfig.Provider>
);
};
export default QlikEmbed;
Hi,
I am also trying the same. are you using Qlik cloud platform or Qlik Enterprise edition.
Mine is May 2024 Enterprise version and I'm trying to integrate @qlik/embed-react.
My authentication model is ticket now (which is configured in QMC).
Currently we are not able to make a connection properly any help ?