dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.98k stars 1.71k forks source link

TableView TextCell command executes only once #21112

Open Legends opened 6 months ago

Legends commented 6 months ago

Description

Here is the original issue: https://github.com/dotnet/maui-samples/issues/403

Doesn't work on Windows Works on Android, didn't test on others.

Here a reproduction example.

The MainPagecontains a TableViewcontrol where each TextCellshould trigger a NavigationCommandwhich opens the respective ContentPage.

When you click on a TextCellyou will navigate to the respective ContentPage. When you go back to the MainPageand try to click another TextCell, the the navigation command won't execute anymore, no matter which cell you click on.

Steps to Reproduce

Run the solution on Windows 10.

SDK Version: 8.0.200

Installed Workload Id Manifest Version Installation Source

maui-windows 8.0.6/8.0.100 VS 17.9.34622.214 ios 17.2.8004/8.0.100 VS 17.9.34622.214 maccatalyst 17.2.8004/8.0.100 VS 17.9.34622.214 wasm-tools-net6 8.0.2/8.0.100 VS 17.9.34622.214 wasm-tools 8.0.2/8.0.100 VS 17.9.34622.214 android 34.0.52/8.0.100 VS 17.9.34622.214

Link to public reproduction project repository

https://github.com/dotnet/maui-samples/tree/main/8.0/UserInterface/Layouts/AbsoluteLayoutDemos

Version with bug

8.0.3 GA

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows, I was not able test on other platforms

Affected platform versions

No response

Did you find any workaround?

no

Relevant log output

No response

PureWeen commented 5 months ago

@Legends if you have a change to test android/ios that would be helpful

I'm curious if the sample is just written incorrectly vs a bug with TableView

Legends commented 5 months ago

@Legends if you have a change to test android/ios that would be helpful

I'm curious if the sample is just written incorrectly vs a bug with TableView

As I have mentioned above: It works on Android, but not on Windows. I have no way to test on iOS.

XamlTest commented 5 months ago

Verified this on VS 17.10.0 Preview 2.0(8.0.14). Repro on Windows 11, not repro on Android 14.0-API34, iOS 17.2 and MacCatalyst with below Project:

AbsoluteLayoutDemos.zip

Auto72 commented 3 months ago

Running any official .NET MAUI example on Windows that uses the TableView to list the examples to try, I face this problem:

On the MainPage I click one item in the list to open the clicked example in a new page. When I came back from that new page, I can click on any items in the list of examples, but they won't open any new example page anymore :-( It works only for the first example you click, just the first time.

It works on Android and iOS.

https://github.com/dotnet/maui-samples/tree/main/8.0/UserInterface/Views/ListViewDemos