locked
Problem with search , Release Preview

    Question

  • Hi! 

    I got a problem with a search contract .

    I tested by created new project > grid app .

    Then add search .

    After added, I can search in Charm. It query the right text that I typed, and show the right search result.

    but the problem is when I click any result , it navigated me to the 1st item index every time.

    So, I try to debug and found that when I navigated item.data in search.js , the item.data is undefined .

    Here are an example 

    In Iteminvoked function .

    var idx = Data.items.indexOf(item.data, 0); // item.data is undefined , item.Data is also undefined .
    nav.navigate("/pages/itemDetail/itemDetail.html", { 
    group: item.data.group, selectedIndex: idx });
    // nav.navigate("/pages/itemDetail/itemDetail.html", {item.data,0}); // this's not worked cuz item.data is undefined

    What should I do ??

    Thanks

    Friday, June 15, 2012 5:23 PM

Answers

  • Finally I can solved it . 

    Just 

    nav.navigate("/pages/itemDetail/itemDetail.html", {item: Data.getItemReffence(item.data)});



    • Marked as answer by FcosAlfa Monday, June 18, 2012 10:18 AM
    Monday, June 18, 2012 10:17 AM