Skip to content

ListViewAdapter implementation reports it has stable IDs, but its IDs are actually position-based #4724

@madakk

Description

@madakk

The ListViewAdapter implementation returns true from hasStableIds:

public hasStableIds(): boolean {
return true;
}

But in fact, the item IDs are just reflecting the item positions:

public getItemId(i: number) {
return long(i);
}

So if the items are rearranged, or removed, the IDs are no longer stable.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions