TableView TextCell command executes only once
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.
The MainPage contains a TableView control where each TextCell should trigger a NavigationCommand which opens the respective ContentPage.
When you click on a TextCell you will navigate to the respective ContentPage.
When you go back to the MainPage and 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
@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 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.
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:
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
I have tried below code its works.
Return to menu and click on other menu items. Its working
<TableView x:Name="tableList" Intent="Menu"> <TableRoot> <TableSection Title="Layout"> <TextCell Command="{Binding Path=BindingContext.NavigateCommand, Source={x:Reference tableList}}" CommandParameter="{x:Type views:VerticalListTextPage}" Detail="Text" Text="Vertical list" /> </TableSection> </TableRoot> </TableView>
I tried the new .NET MAUI 9.0 official examples on Windows and I'm experiencing the same issue.