NativeScript/nativescript-angular

RadListView / tkListItemTemplate index doesn't update when ObservableArray changes

csimpi opened this issue · 0 comments

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 7.0.8
  • Cross-platform modules:
  • Android Runtime: 7.0.0
  • iOS Runtime: -
  • Plugin(s): -
  • NativeScript-Angular: 10.0.0
  • Angular: 10.1.3

Describe the bug

Using RadListView with ObservableArray when I change the array, the index won't follow the changes. Everything else works as expected.

To Reproduce

The bug is 100% reproducible using this sample:
https://play.nativescript.org/?template=play-ng&id=sbm9Rh&v=3

  1. Tap on the items, the appearing text should match.
  2. Delete: Item 3 by clicking X
  3. Tap on Item 4 or Item 5, the appearing text won't match.

Expected behavior

When the ObservableArray changes, the index should represent the belonging item.

Sample project

https://play.nativescript.org/?template=play-ng&id=sbm9Rh&v=3

Additional context