Skip to content
This repository was archived by the owner on Jan 2, 2026. It is now read-only.
This repository was archived by the owner on Jan 2, 2026. It is now read-only.

Empty future list after undoing action #103

Closed

Description

@imlgm

image

there is an empty future list in my app's state after i triggered unto action. I can't figure out what caused this.

Following is my configuration:

createStore(undoable(reducer, {
        limit: 20, 
        filter: (action) => {
            return undoableActions.indexOf(action) !== -1; 
        }, 
        undoType: EDITPANEL_UNDO, 
        redoType: EDITPANEL_REDO, 
        initTypes: ['@@redux-undo/INIT'], 
        debug: true, 
    }), UIBuilderState.get(stateKey), applyMiddleware(thunk));

Did I do something wrong?

Activity

  1. added
    bugSomething in this project needs to be fixed
    on Jul 29, 2016
  2. omnidan commented on Jul 29, 2016

    @omnidan
    Owner

    @imlgm could you provide a small example repo to make it easier to reproduce and fix this issue? something similar to this: https://github.com/peteruithoven/redux-undo-filtering-issue-example would be perfect 😁

  3. imlgm commented on Aug 10, 2016

    @imlgm
    Author

    @omnidan OK, I will try,
    Because the project I run is a little complicated, and the project also used some private package. I am not sure whether I can reproduce the bug if I set up a new demo project.

  4. davidroeca commented on Dec 14, 2016

    @davidroeca
    Collaborator

    I've fixed this in the following pull request: #139

    The problem in your case is that the present is filtered, and the old logic didn't allow for any state to be saved in the past or present if wasFiltered was true. My change removes wasFiltered in favor of a copy of the state from the most recent unfiltered action, which gets updated every insert, undo, redo, or jump

  5. added a commit that references this issue on Dec 20, 2016
  6. omnidan commented on Dec 20, 2016

    @omnidan
    Owner

    I published a new version beta9-3 that should fix this issue (thanks a lot, @davidroeca 🎉)

    Let me know if it works now and feel free to reopen if you're still having issues! 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething in this project needs to be fixed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions