unoplatform/uno

`CollectionViewSource` is making first element in a `ListView` to be visually selected even with `SelectionMode=None`

Open

#11,604 创建于 2023年3月7日

在 GitHub 查看
 (5 评论) (0 反应) (0 负责人)C# (837 fork)batch import
area/listview 📃difficulty/starter 🚀good first issuehas-repro-branchkind/buglow-hanging-🍒project/items 🧾triage/potentially-fixed

仓库指标

Star
 (9,789 star)
PR 合并指标
 (平均合并 14天 8小时) (30 天内合并 130 个 PR)

描述

Current behavior

If first element gets out of Viewport and get in back then it visually selected. It's happening when using CollectionViewSource as ItemsSource. Tested on Android but it possible for other platforms that supports CollectionViewSource to have the same issue

agaga

Expected behavior

No visual selection

How to reproduce it (as minimally and precisely as possible)

  1. Scroll down so that first element is not visible
  2. Scroll up again to the first element
  3. It's selected but only visually

ListViewCollectionViewIssue.zip

Workaround

Not to use CollectionViewSource

Works on UWP/WinUI

Yes

Environment

Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia

NuGet package version(s)

No response

Affected platforms

Android, iOS, Mac Catalyst

IDE

No response

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

It's likely for other platforms to have the same issue that supports CollectionViewSource

贡献者指南