javascript - Phonejs toolbar menu text shows twice -


Recently, I use the HTML5 framework: "Phones" to develop a mobile project, when I I want to create a toolbar menu with empty view,

It looks like the menu text will show in this demo twice:

I use it like this:

  homeToolbarItems = [location: 'menu', text: 'logout', click Action: logout}, {location: 'center', text: 'manage membership'}];  

And the menu shows 'logout' twice, what can I do?

It appears that the menu item renderer is triggered twice on the initial view once more on click Once I was able to solve this buggy behavior by adding an initial flag to render for the first time. If the flag is slipped then do not re-present the menu item on the additional request. Example ...

  var menuInit = Incorrect; Var viewModel = {menuItemRenderer: function (itemData, itemIndex, itemElement) {if (menuInit == incorrect) {itemElement.dxButton ({text: "Execute" "+ itemData.text +" \ "action"}); Menuinit = true; }}}  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -