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

Create undo #172

Open
AndrewPixel opened this issue Apr 14, 2021 · 0 comments
Open

Create undo #172

AndrewPixel opened this issue Apr 14, 2021 · 0 comments

Comments

@AndrewPixel
Copy link

How would I go about creating a, say, 10 level undo?

I have a rather large database that tracks the state of a large number of powerpoint-type slides. The data for each slide is stored over 30+ records eg

let slides = TAFFY([
{"id":1, "slide": 1, "type":"ssqcb","name":"question","disabled": 0,"value":""},
{"id":2, "slide": 1, "type":"ssqcb","name":"option0","disabled": 0,"value":"choice 1"},
{"id":3, "slide": 1, "type":"ssqcb","name":"option1","disabled": 0,"value":"choice 2"},
...
]);

With 50 slides there could easily be 1500+ records.

Users can add, delete, and edit slides. So a large number of records can be added or deleted in one go.

db.settings has onDBChange (and onInsert, onUpdate, and onRemove) but I don't know how to proceed. It looks like I'd need to store the entire db before any change is made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant