Open FawazTakahji opened 10 months ago
Maybe give #13970 a try?
Maybe give #13970 a try?
I gave it a try, by default it doesn't fix it, but if I set UpdateSourceTrigger to "LostFocus" it kinda fixes it
Same when navigating to a different page.
https://github.com/AvaloniaUI/Avalonia/assets/23435053/13f8aebc-9061-4ec9-bb9b-69ff06117b8d
I have a sample project attached where this issue is reproducible.
As a temporary fix setting the binding mode for the ItemsSource to onetime fixes this issue on 11.0.7
People that use CommunityToolkit.Mvvm can do something like this
partial void OnSelectedItemChanged(Item? oldValue, Item newValue)
{
if (newValue == null)
{
Dispatcher.UIThread.InvokeAsync(async () =>
{
await Task.Delay(3);
SelectedItem = oldValue ?? Items[0];
});
}
}
if the property gets changed without a delay it keeps trying to set it to null until a stack overflow exception happens
Describe the bug
If a top level item gets selected and the flyout gets closed the selecteditem gets set to null, this doesn't happen with a subitem
To Reproduce
Screenshots
Environment
Additional context