Skip to content

Strange behavior of selectEntityByPredicate #532

@dzolotarova

Description

@dzolotarova

Which @ngneat/elf-* package(s) are the source of the bug?

entities

Is this a regression?

No

Description

I tried using selectEntityByPredicate to find which entity is now isFavorite: true. It can only be one favorite entity at a time. But once an entity is selected, it never becomes unselected, even if it should be (by predicate). Other methods like selectManyByPredicate and selectAllEntitiesApply work correctly and dynamically. Perhaps this behavior was intended for selectEntityByPredicate?

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/vitejs-vite-j8nt1x?file=src%2Fmain.ts

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in

No response

Anything else?

No response

Do you want to create a pull request?

No

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