Hi,
I am trying to determine if my PCF component should render in mobile layout or a web layout. I did not want to use the allocatedWidth and allocatedHeight to determine the layout as this may be a hit or miss and we cannot set a valid threshold to choose a layout (mobile or web) in all scenarios.
However, I found the Client.getFormFactor() and Client.getClient() methods and thought that may be the solution. But I can't seem to understand these API in PCF.
When creating a Canvas app in a Mobile layout in Power Apps Web client, the getClient() returns "Web" and getFormFactor() returns 1. When will the getClient() return "Mobile" and getFormFactor() return 3 (for Phone)?
https://docs.microsoft.com/en-us/power-apps/developer/component-framework/reference/client

Report
All responses (
Answers (