Skip to content

withRegion + clearNode incorrectly clears not related sample targets #1200

@velialiev

Description

@velialiev

What is the current behavior:

Removing region using clearNode removes not only relations with region units but with any other units that are used in the same sample target array as them

Please provide the steps to reproduce and if possible a minimal demo of the problem via https://share.effector.dev, https://codesandbox.io or similar

https://share.effector.dev/CfOXurO3

  1. Create unit A in region R
  2. Create unit B outside of a region R
  3. Create sample outside of a region R with any clock C and target [A, B]
  4. Clear region R
  5. Trigger clock C
  6. Both units A and B are not triggered

What is the expected behavior:

Expected unit B to be triggered since it and sample should not be cleared with region R

Which versions of effector packages, and which browser and OS are affected by this issue? Did this work in previous versions of effector?:

23.2.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcoreeffector package

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions