Skip to content

duplicate events emitted during when setSelected(true) is called on a rux-tree-node #1458

@TobyPickard

Description

@TobyPickard

Describe the bug
When you press a button to use the setSelected function on a rux-tree-node, when the node is not selected already, it appears that the tree fires the ruxtreenodeselected event twice

To Reproduce
Steps to reproduce the behavior:

  1. Go to the sandbox link below
  2. Open the dev tools console
  3. Click on CLICK ME! button without selecting a node in the tree
  4. In the console you will see duplicate events that have been printed from the event being fired twice
  5. if you select dir1.1 manually in the tree instead of using the 'CLICK ME!' button the event is only fired/printed once

Current behavior
when you press a button that sets a tree node to selected the ruxtreenodeselected event is fired twice if the node is previously not selected

Expected behavior
the event should only be fired once

CodeSandbox
https://codesandbox.io/p/sandbox/happy-ganguly-kdwj93

Environment:

  • Browser: Chrome
  • Framework: Angular
  • Framework wrapper version: @astrouxds/angular - 7.25.0

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions