angular-architects / ngrx-toolkit

Various Extensions for the NgRx Signal Store
MIT License
146 stars 22 forks source link

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

Closed manfredsteyer closed 3 months ago

manfredsteyer commented 3 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 3 months ago

@manfredsteyer do you maybe have a small snippet?

manfredsteyer commented 3 months ago

@rainerhahnekamp What do you mean with small snippet?

rainerhahnekamp commented 3 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.