Looking for a way or suggestions on how to disable a widget if viewed on a mobile device or tablet. Thought I'd check with the community if a) anyone has done this and/or b) if this would be useful to anyone else? Thanks,
Web AppBuilder Custom Widgets
web appbuilder2.2
Ryan,
Depending on if this widget is inside a controller widget (i.e Header controller widget) or an onscreen widget determines how difficult this will be. I have helped another poster in the past hide widgets based on the user logged in (their authorization to access the widget).
Robert - Thanks for including that link, that could definitely come in handy later on.
At this very preliminary point, I'd say the widget needing hidden on layout change could be either in the controller header or an onscreen - which ever is the path of least resistance.
My handle on Dojo/JavaScript is not as good as I'd like it to be, and as far as solutions go for hiding a widget in a mobile/tablet layout all I can really think of are CSS media queries. Any guidance is very much appreciated.
Ryan,
I totally forgot that this is way easier than it use to be in the main config.json there is a mobileLayout property and in that object it lists all the widget you want to use from mobile. So all you have to do is remove that widget from that section of the config and you are good to go.