Wrong (unexplainable) filtering items in collection-repeat with search box

Here is a test app http://codepen.io/toddhalfpenny/pen/dPXpWY
Try to type ‘3’, or ‘4’, or any other number in the filter input, and review the results offered. This example at least does not display any result if ‘x’ for instance is typed. But in a real life app with various text data, the results are weird.
When I replace collection-repeat with a simple ng-repeat everything works perfect.
Beta 14.
PS By the way, collection-repeat ignores class="has-subheader" but this is another issue.

you currently have this

<ion-radio
   collection-repeat="item in list | filter:search"
   collection-item-width="'100%'"
   collection-item-height="52"
   ng-style="{ height: '52px', width: '100%', 'border-bottom': 'none' }"
   ng-model="selectedItem"
   ng-value="'{{ ::item }}'">
   {{ ::item.n }}
</ion-radio>

try it with out the one time bindings

<ion-radio
   collection-repeat="item in list | filter:search"
   collection-item-width="'100%'"
   collection-item-height="52"
   ng-style="{ height: '52px', width: '100%', 'border-bottom': 'none' }"
   ng-model="selectedItem"
   ng-value="'{{ item }}'">
   {{ item.n }}
</ion-radio>

one time bindings breaks collection-repeat

1 Like

Thank you for the instant response. One time binding was a really the reason. I hope collection-repeat does not affect on UI performance. I mean that advantage it provides is greater than a number of watchers created.

Just a quick note, this issue with one-time binding also affects ng-repeat. It is an angular constraint rather than an Ionic one.

1 Like

Thanks for clarifying that @toddhalfpenny.