-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CollectionView Crash when clearing & adding data second time. #7343
Comments
I fail to retrieve data from https://www.montemagno.com/monkeys.json, so I comment your |
I believe this is the same issue I experienced here: #7237 |
Happened to me too, but only in a Grouped |
A possible workaround is to use an [INotifyPropertyChanged]
public partial class MainViewModel
{
[ObservableProperty]
List<Monkey> monkeys = new();
[RelayCommand]
void ReloadMonkeys()
{
List<Monkey> newMonkeys = Monkeys is null ? new() : new(Monkeys);
newMonkeys.Add(new("A1"));
newMonkeys.Add(new("A2"));
newMonkeys.Add(new("A3"));
Monkeys = newMonkeys;
}
} instead of: public partial class MainViewModel
{
public ObservableCollection<Monkey> Monkeys { get; } = new();
[RelayCommand]
void ReloadMonkeys()
{
Monkeys.Add(new("A1"));
Monkeys.Add(new("A2"));
Monkeys.Add(new("A3"));
}
} |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Hi @jamesmontemagno. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version. You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
Verified this issue with Visual Studio Enterprise 17.6.0 Preview 6.0, Not repro on iOS platform with above project. |
Description
See: dotnet-presentations/dotnet-maui-workshop#49
Steps to Reproduce
1.) Open https://github.com/dotnet-presentations/dotnet-maui-workshop "Finish folder"
2.) Launch on iOS
3.) Load monkeys
4.) Load Monkeys again -> crash
Version with bug
Release Candidate 3 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS, macOS
Affected platform versions
iOS and possibly Mac (all versions)
Did you find any workaround?
not yet ;(
Relevant log output
No response
The text was updated successfully, but these errors were encountered: