skeletonlabs / skeleton

A complete design system and component solution, built on Tailwind.

Home Page:https://skeleton.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RecursiveTreeView on:toggle unexpected events

nonvenomous opened this issue · comments

Current Behavior

  • parent 1 (toggled 1st)
    • child 1 (toggled 2nd
  • parent 2 (toggled 3rd)
    • ...

Toggling parent 2 after toggling parent 1 and child 1 causes one unexpected event to dispatch which implies that child 1 was toggled again after parent 2.

Expected Behavior

Clicking on one parent shouldn't cause a on:toggle on a different element

Steps To Reproduce

In my repo

  1. Click on first parent
  2. Click on first child
  3. Click on second parent
  4. unexpected event for first child

image

Link to Reproduction / Stackblitz

https://stackblitz.com/~/github.com/nonvenomous/skeleton-tree-view-duplicate-events

More Information

No response

@nonvenomous This should be solved with the new version of the tree-view in Skeleton-Next.
However, I will mention this bug in the central issue there to make sure we test for this case when we are done with the implementation 👍
#2358