-
Notifications
You must be signed in to change notification settings - Fork 380
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
[BUG] UniformItemsLayoutManager throws ArgumentException upon removing all children #1816
Comments
Most likely this is expected as you call Remove method with the Null parameter. |
@VladislavAntonyuk step 4 was just an quick and generic way of removing a single child from the collection. |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 3 days. It will be closed if no further activity occurs within 2 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate. |
Added reproduction project repository. |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 3 days. It will be closed if no further activity occurs within 2 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate. |
bump. |
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
UniformsItemsLayoutManager throws an ArgumentNullException when all its children are removed.
Expected Behavior
UniformsItemsLayoutManager doesn't throw an exception and goes back to the state it would be in when instantiating without children.
Steps To Reproduce
Link to public reproduction project repository
Environment
Anything else?
The exception is thrown by the Math.Clamp method at UniformItemsLayoutManager.shared.cs#L91 due to visibleChildrenCount being lower than the minimum value.
Simply adding
columnsCount != 0 &&
to the if statement resolves this exception.The text was updated successfully, but these errors were encountered: