Jakub
Posts: 0
Joined: Fri Dec 05, 2014 10:53 pm

dividers duplicated

I am using the code below to display custom dividers in the list.
For some reason the divider is duplicated if user enters Item1 divider, then Item2 divider and then again Item1 divider. (see attached image)
Is there a way to fix that?

var listName = "lstMethods_3";

var deviderOrder = 0;

var lblOut="";

Appery(listName).listview({

Code: Select all

 autodividers: true, 

 autodividersSelector: function (li) { 

     // Here is a place where you need return autodevider text. 

    // return "AutoDevider[" + deviderOrder++ + "] = " + li.text().trim(); 
     var label = li.find("[name=lblSite]"); //Find component 

    // alert(label.text()); 

     if (label.text()!=="") { 
         // lblOut = "Site: "  + label.text(); //Return label text 
          lblOut = label.text(); //Return label text 
     } else { 
          lblOut = ""; 
     } 

     return lblOut; 

 } 

});

Appery(listName).listview("refresh"); //Refresh list component

Appery(listName).trigger("listviewcreate"); //Initiate dividers creation

Image

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

dividers duplicated

Hi Jakub,

Please give us your app public link and describe steps to reproduce this issue in your app.

Regards.

Jakub
Posts: 0
Joined: Fri Dec 05, 2014 10:53 pm

dividers duplicated

Connect to
http://m.spectrum-analytical.com/Meth...

  • Enter string into the Site field (e.g. MW-1)

  • Click item from the list below (Hexavalent Chromium)

  • On the Cart Page click the Methods button on top left

  • Enter different string into Site (MW-2)

  • Click item from the list below (Hexavalent Chromium)

  • On the Cart Page click the Methods button on top left

  • Enter same string as the first one into the Site field (MW-1)

  • Click different item in the list below (Soluble Metals)

    On the cart page you will see that there are now 2 dividers labeled MW-1
    This does not happen when user selects items for each site sequentially. then they are grouped correctly.

Jakub
Posts: 0
Joined: Fri Dec 05, 2014 10:53 pm

dividers duplicated

Hello? Any solution to this?
Thx

Ihor Didevych
Posts: 0
Joined: Wed Nov 19, 2014 7:55 pm

dividers duplicated

Hello,

We will update as soon as have more information regarding your request.

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

dividers duplicated

Hello,

1) We assume that you have messed up somewhere with mapping, because you have duplication of all used methods, thus clearing and mapping doesn't work, also approach of your idea implementation is wrong in terms of using Appery.io platform.
2) You can share your app with support and tell us its name, so we could tell you more precise.

Return to “Issues”