Yes
The code that was recently updated in 2.4 breaks the Image in cases where it is in a listview/radlistview and the data that would go into the image is a null/empty src. In this case the OLD image from the recycled listview cell continues to show instead of the cell image being blanked out.
Android (might occur on iOS, untested)
nativescript │ 2.3.0
tns-core-modules │ 2.5.0-2016-11-07-4695
tns-android │ 2.5.0-next-2016-11-07-1363
Is this a regression @dtopuzov ? Cc @hhristov.
Can confirm that the behaviour is observed when I reproduce the scenario described by @NathanaelA
Code to reproduce here
Or use the one below:
_main-view-model.ts_
import {Observable} from 'data/observable';
export class HelloWorldModel extends Observable {
private items: Array<string>;
constructor() {
super();
this.items = ["res://icon", "res://logo","res://icon","res://logo",null,null,null,null,null,null,null,null,null,null, "res://logo","res://icon"];
}
}
_main-page.xml_
<ListView.itemTemplate>
<StackLayout>
<Label text="test" textWrap="true" />
<Image src="{{ $value }}" stretch="none" />
</StackLayout>
</ListView.itemTemplate>
</ListView>
_main-page.ts_
import { EventData } from 'data/observable';
import { Page } from 'ui/page';
import { HelloWorldModel } from './main-view-model';
export function navigatingTo(args: EventData) {
let page = <Page>args.object;
page.bindingContext = new HelloWorldModel();
}
Expected: the list view to have 4 items with images.. then scroll a bunch with null images and then finish with 2 images.
Actual result: when scrolling the images are not recycled and the old ones are showing in cells where the images has null as a value for src
These two PRs will fix the issue:
https://github.com/NativeScript/tns-core-modules-widgets/pull/96
https://github.com/NativeScript/NativeScript/pull/4073
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Can confirm that the behaviour is observed when I reproduce the scenario described by @NathanaelA
Code to reproduce here
Or use the one below:
_main-view-model.ts_
_main-page.xml_
_main-page.ts_
Expected: the list view to have 4 items with images.. then scroll a bunch with null images and then finish with 2 images.
Actual result: when scrolling the images are not recycled and the old ones are showing in cells where the images has null as a value for src