Skip to content

Filter is not working to exclude actions from undo/redo history #306

@dmathisen

Description

@dmathisen

I'm submitting a ...

  • Bug report
  • Feature request
  • Docs update
  • Support request => Please do not submit support requests here, see note at the top of this template.

What is the current behavior/state of the project?

The filter property seems to be broken.

What is the desired behavior?

Reducers listed in the filter array should be ignored from undo/redo history.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via a gist or similar.

Reproduceable in this CodeSandbox.
In this example, the 2nd number has a filter to exclude the action (see store.ts filter: excludeAction(["increment2", "decrement2"])). So I would expect the 2nd number to NOT be affected by undo/redo, but it is.

image

Please tell us about your environment:

  • Library version: 1.1.0
  • Redux version: 8.1.2
  • Browser: all
  • Language: TypeScript 5.1.6

Note: there's a (maybe) related issue filed a long time ago and it says that the issue may have been introduced in 1.0.0-beta8, but I haven't been able to verify.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions