How to set current item in App Maker datasource?

前端 未结 2 1257
没有蜡笔的小新
没有蜡笔的小新 2021-01-20 11:26

This seems basic but I can\'t seem to figure out how to manually set the current item to work with from the datasource?

To illustrate: I have a table and I notice th

2条回答
  •  一整个雨季
    2021-01-20 11:40

    Use a timeout function. This happens because it takes some time for appmaker to change the item in the datasource. You can use something like this on the onClick event handler of the button or link that will take you to the other page:

    setTimeout(function(){
      app.showPage(app.pages.pageToNavigate);
    },200);
    

    That should take care of the issue. I hope this helps!

提交回复
热议问题