mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-17 00:07:24 +00:00
Fix Angular tracking of row in orders list
The tooltip content for the order in index n in page x was being used for the order in index n in page y. This was because ng-repeat was tracking the items/rows by index. As far as ng-repeat is aware, rows with the same index in any page were the same items/rows, so it didn't bother relinking the ofn-with-tip directive.
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
|
||||
%th.actions
|
||||
%tbody
|
||||
%tr{ng: {repeat: 'order in orders track by $index', class: {even: "'even'", odd: "'odd'"}}, 'ng-class' => "'state-{{order.state}}'"}
|
||||
%tr{ng: {repeat: 'order in orders track by order.id', class: {even: "'even'", odd: "'odd'"}}, 'ng-class' => "'state-{{order.state}}'"}
|
||||
%td.align-center
|
||||
%input{type: 'checkbox', 'ng-model' => 'checkboxes[order.id]', 'ng-change' => 'toggleSelection(order.id)'}
|
||||
%td.align-center
|
||||
|
||||
Reference in New Issue
Block a user