Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Changes the default targetStore of UndoManager to getParent instead of getRoot #834

Closed
wants to merge 1 commit into from

Conversation

robclouth
Copy link

Fixes issue #832. I think that for more flexibility the targetStore should default to the parent not the root. This allows you to have undo managers on child object, for example a separate undo history for each note in a note-taking app.

Tests pass.

lerna success run Ran npm script 'test' in packages:
lerna success - mobx-state-tree
lerna success - mst-example-bookshop
lerna success - mst-example-boxes
lerna success - mst-example-redux-todomvc
lerna success - mst-example-todomvc
lerna success - mst-middlewares
✨  Done in 28.53s.

@robclouth
Copy link
Author

No, no this doesn't work at all. We need more tests.

@mweststrate
Copy link
Member

@robclouth added WIP status to the title to make that clear :)

@mweststrate mweststrate changed the title Changes the default targetStore of UndoManager to getParent instead of getRoot WIP: Changes the default targetStore of UndoManager to getParent instead of getRoot Jun 8, 2018
@mweststrate
Copy link
Member

I think #875 is the proper fix for this, correct @robinfehr ?

@stale stale bot added the stale Stale issue due to inactivity label Oct 11, 2018
@xaviergonz xaviergonz added the never-stale Should never be marked as stale by the bot label Oct 11, 2018
@stale stale bot removed the stale Stale issue due to inactivity label Oct 11, 2018
@xaviergonz xaviergonz removed the never-stale Should never be marked as stale by the bot label Oct 11, 2018
@mobxjs mobxjs deleted a comment from stale bot Oct 11, 2018
@xaviergonz xaviergonz added the enhancement Possible enhancement label Oct 21, 2018
@xaviergonz
Copy link
Contributor

Closing since the issue that this PR wanted to address seems to have been fixed for a long time

@xaviergonz xaviergonz closed this Jan 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Possible enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants