googlearchive / core-list

Polymer virtualized list element
25 stars 20 forks source link

Support Hiding Rows #87

Open indolering opened 9 years ago

indolering commented 9 years ago

I am trying to implement a filter/incremental search, but I am running into issues with updating the view, especially with large lists (1,000-10,000). I've tried attaching updateSize to the on-input event, but it's still problematic. When I filter everything but the last element, even manual calls using a dedicated updateSize button do not work.

I'm just guessing how you would go about this, but perhaps you could attach an observer to the element's display attribute that calls updateSize.

indolering commented 9 years ago

I created a "refresh" button that calls updateSize and also scrolls to the first matching element. This "fixes" the visual issue but I can't think of a way to detect when there are no elements visible in the viewport figuring out if there is an element that is visible in the list is very inelegant. I'll post a link when I have a working hack, but direct support would be ideal.