Forum Discussion
PowerBi Embedded JS - Slicer requires clicking twice to show dropdown options
I have 2 slicers (dropdown lists) in a power bi report embedded in my application. Whenever the user clicks on a slicer to select a value, the first time never loads. They have to click out, and re-click the slicer again, then the values show as expected. I'm using Microsoft.PowerBI.JavaScript 2.18.0 and am not sure why this is happening or any kind of workaround for this. I can see the data being returned back from powerbi, but the dropdown does not populate with them until the second click on the dropdown.
Has anyone seen this before? Any guidance on what's happening and how I can find a resolution for this?
I have attached some photos of this issue
2 Replies
- V-lianl-msft
Community Support
Hi Anonymous ,
Unfortunately, I can't reproduce your issue. Will there be such issues in the original report? Or just after embedding?
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- AnonymousNot applicable
No, the slicers work properly on first click and populate as expected, both in the app.powerbi.com portal and the app.power.com/reportEmbed page - the issue only seems to arise when embedding in my application.
I've tried adding javascript after rendering to manually click any slicers on the report to remediate this, but this behavior is blocked by browsers as it's consider a XSS issue since the iframe is under a different domain. So I am limited to the functionality provided by the powerbi js library.
If I could I use one of the allowedEvents to catch when the user clicks on the slicer and auto-click it again for them, that would work in the meantime.
Thoughts?