Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have used @qlik/embed-react to embed qlik cloud in reactjs and i want to get current selection in my reactJS app.
i am embedding selection bar using below code
Please help me here.
Hi ,
are you using Qlik cloud platform or enterprise edition ?
I just came across your post. I don't know if you've accomplished your goal, but to build on your own example, you can get the current selections like this:
const app = useApp(appId, hostConfig)
const getSelections = async(app) => {
const selectionsObj = await app.getCurrentSelectionObject();
const selectionsLayout = await currentSelection.getLayout();
return selectionLayout.qSelectionObject?.qSelections);
}
You can also set selectionsObj.on('changed', ... and fetch the new layout when selections change