-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
App crashes when you clear a group's record in CollectionView #20819
Comments
Can repro with maui |
Is there a clear workaround for this and supports animation when collapsing / expanding ? |
This issue does not reproduce in the maui version (9.0.12) with VSCode 1.94.2 and Android Pixel 8 API 35 (Android 15). Demo.mov |
Hi @simon10says. 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. |
Description
I've a grouped collectionview that is binded to
ObservableCollection
. When IClear()
a group of its records and re-Add()
, I getIndexOutOfBoundsException
as shown below:Steps to Reproduce
Run my repo and you will see the collectionview with 2 groups (Bears and Monkeys)
Click on the
Remove Record
toolbar item and theAsian Black Bear
record will be removedClick on the
Add Record
and you will get theIndexOutOfBoundsException
Link to public reproduction project repository
https://github.com/simon10says/maui-CollectionViewGroupBug
Version with bug
8.0.7 SR2
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.3 GA
Affected platforms
Android, I was not able test on other platforms
Affected platform versions
No response
Did you find any workaround?
This issue seems to be due to
ObservableCollection.Clear()
. In my code IRemove Record
via:If I use
RemoveAt()
instead, I will not get the exception when I re-add the recordRelevant log output
No response
The text was updated successfully, but these errors were encountered: