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:
Kristina Lim
2019-11-30 03:29:09 +08:00
parent 6ffe7f1a99
commit 2673a6efee

View File

@@ -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