-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Listview with a single item loses binding, does not respond to tapped event #1477
Comments
Have you tried and reduce this reproduction so that it does not reference non-forms packages (Unity, Sqlite, EF Core, etc)? If not, would you mind going through that exercise? |
@seankanderson Were you able to reduce the reproduction? |
I was not able to get around to stripping out all of the dependencies. Got really busy with other stuff and left that bug on the back burner in the hopes it would be resolved by another (possibly separate or unrelated) bug fix. Unfortunately I have been torn away from mobile development for the time being. I did notice in further testing that the bug is not limited to a single list item. It fails to select an item when it was the one previously selected. If item #1 was selected and "sent" to a detail page you cannot select item #1 after navigating back. This holds true for any item in a list of any size. |
I am going to move this bug over to the work pile, but without a minimal repro its pretty low on that pile. |
The issue reported here is due to the fact that the SelectedItem in the test project is not set to null when navigating to the second page, therefore when it goes back to the first page, the SelectedItem is still a valid Item and trying to "reselect" this item does not trigger the ItemSelected event. |
It seems that the last comment here describes what was going on and has an easy workaround. Since a repro isn't available anymore/was never provided I think it's safe to close this one. |
Description
Happening under UWP/Android (iOS not tested)
In a navigation page I have a listview (data template) bound to an ObservableCollection in a view model. When there is a single item in the list I can click/tap that item and the viewmodel bound command fires. When I navigate back to that page with the listview the tap/click no longer fires the command.
If I add more items to the list it works as expected.
Steps to Reproduce
Clone and debug in Visual Studio 2017
https://github.com/seankanderson/Temp-Xamarin-Bug-Report.git
Application uses Sqlite by default. Suggest running UWP version.
Reproduction Link
https://github.com/seankanderson/Temp-Xamarin-Bug-Report.git
The text was updated successfully, but these errors were encountered: