airbnb / infinity

UITableViews for the web (DEPRECATED)
http://airbnb.io/infinity/
Other
2.8k stars 281 forks source link

Error thrown when using listItem.remove() #12

Closed zanona closed 9 years ago

zanona commented 12 years ago

When calling the remove item on listView I am getting the following error:

var listItems = listView.find('article');
for(var index = 0, length = listItems.length; index < length; index++) {
  listItems[index].remove();
}
//> TypeError: Cannot read property 'items' of null

Any idea on how to fix this? thanks

zanona commented 12 years ago

Just noting this is the same code found on infinity webpage for removing items, except I am selecting articles instead

reissbaker commented 12 years ago

Initially, can't reproduce in the Infinity demo -- calling remove on the ListItems seems to work. Can you give a more detailed stack trace, or steps to reproduce?

wa0x6e commented 12 years ago

I encounter the same problem.

I reproduced it : http://jsfiddle.net/nRHFE/1/

There's an Uncaught TypeError: Cannot read property 'items' of null error when clicking on the button.

rc1 commented 11 years ago

This issue is old now, but still happening.

@airbnb any hints on why this is happening?