Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Context menu in mobile is not working

Hello all,

           The recent requirements for a PowerBI custom visual is to have a context-menu to deploy it to the app source. We did implement the context menu as per guide lines and we are able to get the context menu in desktop but we couldn't get the context menu on long-press in mobile. We checked the simple bar chart visual of PowerBI to verify, It does not show context menu on long-press. Is this a PowerBI limitation ?

1 ACCEPTED SOLUTION
dm-p
Super User
Super User

Hi @Anonymous

If you've bound the event using contextmenu, then according to the docs, there isn't a corresponding event for mobile. Their suggestion is to use an external library, which I presume means powerbi-visuals-utils-interactivityutils. This library has a method for handling the context menu, although I've just skimmed the source code and it still binds to that event anyway, so your suspicions may be correct.

Deployment to AppSource with this functionality should be fine. I've submitted an uncertified visual that does this, and have recently had another visual pass certification (if you're going that far) using this approach too. However, if you are concerned about getting stuck somewhere in the process and want to ensure everything's right beforehand, you'll be better contacting  pbicvsupport@microsoft.com for specific advice as they'll be the ones reviewing the visual during the process and have been very helpful to me in the past when I've had similar questions.

Good luck,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

1 REPLY 1
dm-p
Super User
Super User

Hi @Anonymous

If you've bound the event using contextmenu, then according to the docs, there isn't a corresponding event for mobile. Their suggestion is to use an external library, which I presume means powerbi-visuals-utils-interactivityutils. This library has a method for handling the context menu, although I've just skimmed the source code and it still binds to that event anyway, so your suspicions may be correct.

Deployment to AppSource with this functionality should be fine. I've submitted an uncertified visual that does this, and have recently had another visual pass certification (if you're going that far) using this approach too. However, if you are concerned about getting stuck somewhere in the process and want to ensure everything's right beforehand, you'll be better contacting  pbicvsupport@microsoft.com for specific advice as they'll be the ones reviewing the visual during the process and have been very helpful to me in the past when I've had similar questions.

Good luck,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.