Skip to content
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

[iOs] Async update of ListView with ObservableCollection not working #2146

Closed
2 of 11 tasks
TopperDEL opened this issue Nov 22, 2019 · 2 comments · Fixed by #2153
Closed
2 of 11 tasks

[iOs] Async update of ListView with ObservableCollection not working #2146

TopperDEL opened this issue Nov 22, 2019 · 2 comments · Fixed by #2153
Assignees
Labels
kind/bug Something isn't working platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform

Comments

@TopperDEL
Copy link
Contributor

TopperDEL commented Nov 22, 2019

Current behavior

A ObservableCollection gets updated from an async function, but the changes are not populated to the Listview it is Bound to. This works on UWP, Droid and WASM.

Expected behavior

The items are populated once they are Added to the ObservableCollection.

How to reproduce it (as minimally and precisely as possible)

See this GitHub-Repo: https://github.com/TopperDEL/UnoTest01
The update happens in OnNavigatedTo from the MainPage. Remove the async Task.Delay to see it update correctly.

My assumption is that ObservableCollection does not raise ItemAdded/Changed-Events on iOs.

Environment

Nuget Package: v2.0.5

Package Version(s):

Affected platform(s):

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renderers for Xamarin.Forms
  • Windows
  • Build tasks
  • Solution Templates

Visual Studio:

  • 2017 (version: )
  • 2019 (version: )
  • for Mac (version: )

Relevant plugins:

  • Resharper (version: )

Anything else we need to know?

@TopperDEL TopperDEL added kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification labels Nov 22, 2019
@jeromelaban jeromelaban added platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform and removed triage/untriaged Indicates an issue requires triaging or verification labels Nov 22, 2019
@jeromelaban
Copy link
Member

jeromelaban commented Nov 22, 2019

Thanks for the report. The ListView is incorrectly measured because it's in a StackPanel. Try placing it in a Grid instead.

@TopperDEL
Copy link
Contributor Author

I can confirm that it's working with a Grid instead of a StackPanel around the ListView.

@mergify mergify bot closed this as completed in #2153 Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants