Skip to content

ItemsRepeater not updating correctly after remove items from ObservableList #26

@adleywd

Description

@adleywd

Describe the bug

I have a personal app that uses ItemsRepeater to list multiple tv shows data. Before updating to Avalonia 11.0.10 everything was working fine regarding removing items from an observable list and the item updating in ItemsRepeater.
I'm also using CommunitToolkit.MVVM.

After the update to 11.0.10 the ItemsRepeater, apparently, loses context the item context and shows the content as it is not loaded.
When I resized the screen "refreshes" and everything item came back to normal.

This project run in windows and android, but the issue only happens in Windows.

So before came here I tried to replicate the issue, with a similar approach I was using a smaller sample project, but I couldn't replicate the issue.

To Reproduce

So the project where the error happens is: (it's kinda big, idk if would help) https://github.com/adleywd/WhatsNextSeries/tree/feature/MigrateToDotNetAvalonia/src/WhatsNextSeries

The sample I tried to reproduce it (but I couldn't yet)
https://github.com/adleywd/AvaloniaItemsRepeaterSample

Expected behavior

When an item is removed from an observable list, the ItemsRepeater should remove the item but keep the context of unmodified items.

Avalonia version
11.0.10

OS
Windows

Additional context
With the bug in Avalonia 11.0.10
After removing and item from the list, other Items go back to default value:
"Tv show name"
"Not available"

11 0 10

With Avalonia 11.0.7
11 0 7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions