Open HaoLife opened 11 months ago
Thanks for the report. Can you provide a full sample that reproduces your problem? It will be easier to discuss the original behavior.
MainPage.xaml ` <Page x:Class="UnoApp1.Presentation.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:UnoApp1.Presentation" xmlns:uen="using:Uno.Extensions.Navigation.UI" xmlns:utu="using:Uno.Toolkit.UI" xmlns:mvux="using:Uno.Extensions.Reactive.UI" NavigationCacheMode="Required" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
`
` using System; using System.Threading;
namespace UnoApp1.Presentation;
public partial record MainModel { private INavigator _navigator; private readonly IDispatcher dispatcher;
public MainModel(
IStringLocalizer localizer,
IOptions<AppConfig> appInfo,
INavigator navigator,
IDispatcher dispatcher)
{
_navigator = navigator;
this.dispatcher = dispatcher;
Title = "Main";
Title += $" - {localizer["ApplicationName"]}";
Title += $" - {appInfo?.Value?.Environment}";
}
public string? Title { get; }
public IState<string> Name => State<string>.Value(this, () => string.Empty);
public async Task GoToSecond()
{
var name = await Name;
await _navigator.NavigateViewModelAsync<SecondModel>(this, data: new Entity(name!));
}
//Uno.Extensions.Reactive.Bindings.BindableListFeed<string>
public IListFeed<string> Trends => ListFeed.Async(async (ct) => await this.GetAsync());
public async ValueTask<IImmutableList<string>> GetAsync()
{
var list = new List<string>() { "test", "456", "7", "8", "9" };
return list.ToImmutableList();
}
}
`
[Uploading UnoApp1 (2).zip…]()
Thanks. It seems that the repro was not attached properly. To create a repro, make sure to follow this.
Hey @HaoLife, thanks for the report.
I tried your sample, I'm not sure what is failing? No matter how I use the selection with MVUX, I get the right selected item (even if I try to unselect the item using the CTRL key).
It needs to constantly switch between selected items, which may lag or become ineffective when replaced frequently
https://github.com/unoplatform/uno/assets/25171162/f0647b02-721a-4a61-842a-43dafc87bb0b
Current behavior
ListViewBase has issues with invalid or delayed selection in mvux mode
Expected behavior
No response
How to reproduce it (as minimally and precisely as possible)
No response
Workaround
No response
Works on UWP/WinUI
None
Environment
No response
NuGet package version(s)
Affected platforms
WebAssembly, Android, iOS, macOS (AppKit), Mac Catalyst, Skia (WPF), Skia (Linux Framebuffer)
IDE
Visual Studio 2022
IDE version
No response
Relevant plugins
No response
Anything else we need to know?
No response