Collection-repeat and pull-to-search


I would like to use collection-repeat but I’m facing an issue with the pull-to-search pattern I was using. My app looks like that:

I would like to be able to hide the search field by default by scrolling a bit to hide it, which was working perfectly using $ionicScrollDelegate and ng-repeat, with a bit of css to set the minimum height of the container of the list to be 100% + height of the search field.

When I switch my ng-repeat will collection-repeat, this works only when the list has a size > 100% + height of the search field. I looked at the collection repeat directive source code and noticed that the directive forces the scroll view to be the same size as the collection-repeat content, not the size of the real content, hence the issue.

Would it be possible to add an offset parameter to the collection-repeat directive so I can add the search field height to the computation, or is there any other way to resolve my issue?


Just to elaborate a little: what I would need, is the ability to set a minimum height for the ionic’s scrollView, because the collection-repeat directive overrides the css styling.

I’m just replying to myself, but in case it helps someone, a fix in the collection-repeat directive was needed, so I submitted a PR: