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

貢獻者指南