Object has no method 'indexOf' for SelectListView


In my package, everytime I open the SelectListView and begin typing to narrow down the results, I get an error in the console say Uncaught TypeError: Object #<Object> has no method 'indexOf', and nothing happens in the SelectListView. In other words, the list is not refined based off of user input. Here’s the code I’m using:

attach: ->
    items = [
              name: "One"
              updatedAt: "june"
              name: "Two"
              updatedAt: "August"

viewForItem: (item) ->
      "<li class=\"two-lines\">
        <div class=\"primary-line file\">#{item.name}</div>
        <div class=\"secondary-line file\">#{item.updatedAt}</div>

Any ideas?


Ok, after a little digging around I found the getFilterKey method. In the context of a SelectListView this is how I ended up using it:

  @::getFilterKey = ->
    return "name"

I think my first package is complete minus a little refactoring. Thanks a lot to everyone that’s helped me out here on the discussion board. And I’m really liking this new editor and the environment in general.


Scott is your package available anywhere? I’m also having some troubles with SelectListView and wouldn’t mind taking a look at what you’ve done if you don’t mind.