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

[Bug]: Blazorise TreeView control shows duplicate entries #5221

Closed
JosephFicara opened this issue Jan 12, 2024 · 5 comments · Fixed by #5238
Closed

[Bug]: Blazorise TreeView control shows duplicate entries #5221

JosephFicara opened this issue Jan 12, 2024 · 5 comments · Fixed by #5238
Assignees
Labels
Area: TreeView Type: Bug 🐞 Something isn't working
Milestone

Comments

@JosephFicara
Copy link

Blazorise Version

1.3.3, 1.3.4 and 1.4

What Blazorise provider are you running on?

Bootstrap5

Link to minimal reproduction, or a simple code snippet

BlazorizeControlWithProgressAndRightClickMenu-Rendered

Steps to reproduce

  1. To enable dynamic loading HasChildNodes="@(item => true)"
  2. Utilize the GetChildNodesAsync="@(async item => await GetChildNodes(item))" to populate the child nodes
  3. Add a child node to a tree node that currently has no child nodes
  4. Observe that the UI shows duplicate child nodes
  5. Collapse and reopen the child node
  6. Observe that the single child node is properly reflected

What is expected?

Only the single node that was added should be shown.

What is actually happening?

Duplicate child nodes are shown

What browsers are you seeing the problem on?

Chrome, Microsoft Edge

Any additional comments?

This only happens when a parent node has no children. If the parent node initially has children, then duplicate nodes are not shown
The backing data store does not get duplicate nodes, its only something that is happening in the tree. When you collapse and expand the parent node the proper children are represented.

@JosephFicara JosephFicara added the Type: Bug 🐞 Something isn't working label Jan 12, 2024
@stsrki stsrki added this to the 1.4 support milestone Jan 13, 2024
Copy link
Contributor

Hello @JosephFicara, thank you for your submission. The issue was labeled "Status: Repro Missing", as you have not provided a way to reproduce the issue quickly. Most problems already solve themselves when isolated, but we would like you to provide us with a reproducible code to make it easier to investigate a possible bug.

@David-Moreira
Copy link
Contributor

@JosephFicara I am sorry but please provide a repository with the reproduceable, there might be very specific things that you are doing in the code that we can't tell... or have to be guessing in order to try and reproduce ourselves.

@JosephFicara
Copy link
Author

JosephFicara commented Jan 14, 2024

Hi @David-Moreira, @stsrki

I added a simplified example in this repo: https://github.com/JosephFicara/blazorisebugs.git

You will find it in the TreeControlTestAppBlazoirizeSolution

Let me know if you have any questions.

Thank you for your help and support.

@David-Moreira
Copy link
Contributor

David-Moreira commented Jan 16, 2024

Hello,
It's indeed a bug where our internals are causing the duplication with the usage of ObservableCollection.

We'll be fixing the issue as soon as possible.

PS: Really appreciated for the good repro, it really helps us alot.

@JosephFicara
Copy link
Author

Thank you @David-Moreira

This was referenced Jan 17, 2024
@stsrki stsrki closed this as completed Jan 17, 2024
@stsrki stsrki added this to Support Aug 3, 2024
@stsrki stsrki moved this to ✔ Done in Support Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment