Pull to refresh widget

3
Hi all,  In our Hybrid mobile app we want to use the Pull to refresh widget which works great if you simply want to refresh the page. However, we would like to make a new call after refreshing the page. Can I tweak the code in such a way that instead of a page refresh (resetDom) it will click a button? If yes, how?    Thanks in advance! Sophie
asked
1 answers
2

Hi Sophie

You can not “click” a button, but you can call an action for example a nanoflow or microflow.

Take the source code

https://github.com/mendixlabs/pull-to-refresh/blob/master/src/PullToRefresh/widget/PullToRefresh.ts#L71

Instead of call refresh you can call an actions

https://apidocs.rnd.mendix.com/8/client/mx.data.html

https://apidocs.rnd.mendix.com/8/client/mx.data.html#.callNanoflow

To provide a microflow to the widget you have add a prop to the XML

https://docs.mendix.com/howto/extensibility/use-xml-widget#5-2-7-microflow

 

The feature is now available in the App Store https://appstore.home.mendix.com/link/app/47782/ version 1.1.0

Cheers, Andries

 

answered