Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Listview with a single item loses binding, does not respond to tapped event #1477

Closed
seankanderson opened this issue Dec 30, 2017 · 6 comments
Labels
a/binding ⛓ e/8 🕗 8 help wanted We welcome community contributions to any issue, but these might be a good place to start! inactive Issue is older than 6 months and needs to be retested t/bug 🐛 up-for-grabs We welcome community contributions to any issue, but these might be a good place to start!

Comments

@seankanderson
Copy link

seankanderson commented Dec 30, 2017

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.

  1. Run application
  2. Create test company when prompted
  3. Go to Inventory on hamburger menu
  4. Tap New and create a new inventory item using only Short Description and Quantity
  5. Navigate back to inventory list
  6. Tap/Click newly added item
  7. Navigate back to inventory list
  8. Tap item again...fails
  9. Add another New inventory item, navigate back
  10. At this point everything should work as expected
  • Version with issue: 2.5.0.121934
  • Last known good version:
  • IDE: Visual Studio 2017 Pro
  • Platform Target Frameworks:
    • iOS: not tested
    • Android: 8.0
    • UWP: 16299
  • Nuget Packages: Unity 5.5.0, Sqlite, EF Core 2.0...the list goes on
  • Affected Devices: Physical Samsung S8 used for testing

Reproduction Link

https://github.com/seankanderson/Temp-Xamarin-Bug-Report.git

@kingces95 kingces95 added the s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. label Jan 4, 2018
@kingces95
Copy link
Contributor

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?

@StephaneDelcroix StephaneDelcroix added the s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. label Jan 15, 2018
@jassmith jassmith added t/bug 🐛 a/binding ⛓ and removed s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. labels Feb 8, 2018
@kingces95
Copy link
Contributor

@seankanderson Were you able to reduce the reproduction?

@kingces95 kingces95 added the s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. label Feb 8, 2018
@seankanderson
Copy link
Author

seankanderson commented Feb 9, 2018

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.

@jassmith
Copy link

jassmith commented Apr 7, 2018

I am going to move this bug over to the work pile, but without a minimal repro its pretty low on that pile.

@jassmith jassmith removed the s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. label Apr 7, 2018
@RodgerLeblanc
Copy link

RodgerLeblanc commented Jul 21, 2018

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.

@samhouts samhouts added the e/8 🕗 8 label Jul 25, 2018
@samhouts samhouts added the inactive Issue is older than 6 months and needs to be retested label Jan 18, 2019
@samhouts samhouts added help-wanted up-for-grabs We welcome community contributions to any issue, but these might be a good place to start! help wanted We welcome community contributions to any issue, but these might be a good place to start! and removed help-wanted labels Jun 28, 2019
@jfversluis
Copy link
Member

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/binding ⛓ e/8 🕗 8 help wanted We welcome community contributions to any issue, but these might be a good place to start! inactive Issue is older than 6 months and needs to be retested t/bug 🐛 up-for-grabs We welcome community contributions to any issue, but these might be a good place to start!
Projects
None yet
Development

No branches or pull requests

7 participants