0

I have embedded the PowerBI report using the ReactJS. There is one slicer/dropdown in it. I want to disable that slicer/dropdown programmatically in the ReactJS.

This is my code to get that visual.

window.report.getPages().then(pages => {
    pages[0].getVisuals().then(visuals => {
      const clientSlicerVisual = visuals.find(visual => visual.name === "123456789");
    });
});

I have tried the below way from the internet to disable the slicer. But it's not working.

clientSlicerVisual.setSlicerState({ filters: [] });

Any other ways to disable the slicer programatically?

1 Answer 1

0

Visuals don't have a "disabled" state, but you can simply remove the visual using the embedded authoring API.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.