[Solved] Problem when I delete a element of a list


#1

Hi to everybody.
I have a problem with one of the list of my app.

I write this code and i have a strange behavior…
When i delete one element it seems to work, but when i remove more, the element is deleted but the button shows on another element…

How i can solve this?

Thanks a lot.

<ion-list can-swipe="true" option-buttons="itemButtons">
  <ion-item class="item item-avatar instalacion-overview anchoTotal" collection-repeat="instalation in instalations" collection-item-width="'100%'" collection-item-height="getItemHeight(item, $index)"  href="#/page/edicion-checklist">

    <div class="instalacion-id" ng-class="colorClass[$index%3];">{{instalation.id}}</div>
				  <i class="icon ion-android-arrow-forward fl_right dark"></i>
				  <p class="paddingSeparacion"> 
				  {{clients[instalation.clientId-1].dni}}, {{clients[instalation.clientId-1].nombre}}<BR>
				  {{instalation.fecha}}, {{clients[instalation.clientId-1].direccion}}
				  </p>
    
    <ion-option-button class="button button-assertive" ng-click="items.splice($index, 1)">
       Delete
    </ion-option-button>
	
 

  </ion-item>
</ion-list>

#2

This is known issue issue with collection-repeat right now.


#3

ok, thanks.
For solve it i use a trick.
before delete the element i close it and then i delete the element.
For me it’s working