salesforce / akita

🚀 State Management Tailored-Made for JS Applications
https://salesforce.github.io/akita/
Apache License 2.0
3.7k stars 342 forks source link

EntityStore - Store reset does not emit entityAction #1080

Open salarenko opened 8 months ago

salarenko commented 8 months ago

Is this a regression?

No

Description

EntityStore allows to listen to the store actions by subscribing to class EntityStore.selectEntityAction$. Resetting the EntityStore does not result in any action despite the store state being changed.

Snippet:

const store = new EntityStore();
store.selectEntityAction$.subscribe(console.log);

store.add({ id: '1' });     // Action emitted
store.add({ id: '2' });     // Action emitted
store.remove('1' );         // Action emitted

store.reset();  // No action emitted 😢

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in

"@angular/core": "17.1.0",
"@datorama/akita": "8.0.1",
"@datorama/akita-ng-entity-service": "8.0.0"

Anything else?

No response

Do you want to create a pull request?

No