angular-architects / ngrx-toolkit

Various Extensions for the NgRx Signal Store
MIT License
177 stars 23 forks source link

fix(undo-redo): prevent duplicated entries on undo stack #58

Closed manfredsteyer closed 5 months ago

manfredsteyer commented 5 months ago

Perform a deep comparison to prevent duplicate entries on the stack. This can, for example, happen after an undo if the component sends back the undone filter to the store.

rainerhahnekamp commented 5 months ago

@manfredsteyer do you maybe have a small snippet?

manfredsteyer commented 5 months ago

@rainerhahnekamp What do you mean with small snippet?

rainerhahnekamp commented 5 months ago

Just some pseudo code so that I can come up with a unit test for the

after an undo if the component sends back the undone filter to the store.

I'm not sure if I fully understand it.