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

TreeView nodes don't expand #144

Closed
Felicity-R opened this issue Dec 1, 2022 · 8 comments · Fixed by #146
Closed

TreeView nodes don't expand #144

Felicity-R opened this issue Dec 1, 2022 · 8 comments · Fixed by #146
Assignees
Labels
bug Something isn't working control-treeview platform-windows Something is related to Windows
Milestone

Comments

@Felicity-R
Copy link

Steps to repro:

  1. Create an app with a TreeView that has some nodes with children.
    I just created a new app from the 'Uranium UI MAUI Blank Template'; added <material:TreeView ItemsSource="{Binding Nodes}"/> to the main page; and defined the nodes by copying the 'MyItems' class and Nodes initialization code from the examples in the docs: https://enisn-projects.io/docs/en/uranium/latest/themes/material/components/TreeView
  2. Run the app
  3. Click on one of the nodes to expand it

Expected Results:
You can expand the node and see the children.

Actual Results:
I can see a hover state over the chevron for a given node, but when I click it doesn't expand. No error is thrown either it just does nothing.

My sample app to repro: https://github.com/Felicity-R/UraniumTreeViewTest

Tested on Windows 10, 19043.2251

@LycianSeattle
Copy link

I hit this problem as well on Windows 11. Using a local build of UraniumUI instead of the nuget packages fixed the issue for me. My guess is that it was fixed by #109

@toxsedyshev
Copy link

@LycianSeattle PR #109 was merged into 2.1 but the bug is still reproduced in 2.1.0 NuGet package.

@LycianSeattle
Copy link

🤷 idk when the fix happened then. I do know locally referencing the projects instead of NuGet packages worked for me. That was the biggest churn I saw.

@enisn
Copy link
Owner

enisn commented Dec 6, 2022

It might be related to IsExpandedPropertyName bindable property.

If the node binding context (nodes in viewmodel) doesn't have a property named IsExpanded, expand state couldn't be kept.

I'll investigate it

@enisn enisn added control-treeview bug Something isn't working labels Dec 6, 2022
@enisn enisn self-assigned this Dec 6, 2022
@enisn enisn added this to the 2.1 milestone Dec 6, 2022
@enisn
Copy link
Owner

enisn commented Dec 6, 2022

@LycianSeattle PR #109 was merged into 2.1 but the bug is still reproduced in 2.1.0 NuGet package.

You're right, ButtonView has issues on windows in release mode.

@enisn
Copy link
Owner

enisn commented Dec 6, 2022

Can you try the new HotFix version 2.1.1? The problem should be solved

@toxsedyshev
Copy link

toxsedyshev commented Dec 6, 2022

@enisn yep 2.1.1 fixed expand handling, but there is a new bug now: nodes with no children show expand button, while shouldn't.

UPD: Ah, sorry, it was me trying to fix Warning: 'IsLeaf' property not found on 'APIClient.MAUI.App.JsonTreeView.JsonTreeView+JsonTreeViewItem', target property: 'UraniumUI.Material.Controls.TreeViewNodeHolderView.IsLeaf' by adding IsLeaf = false

@Felicity-R
Copy link
Author

Can confirm 2.1.1 fixed the issue for me too. Thanks for the quick turnaround!

@enisn enisn closed this as completed Dec 7, 2022
@enisn enisn added the platform-windows Something is related to Windows label Dec 7, 2022
@enisn enisn linked a pull request Dec 7, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working control-treeview platform-windows Something is related to Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants