Skip to content

Cancel button doesn't undo type change #122

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

Closed
kasijus opened this issue Sep 11, 2024 · 5 comments · Fixed by #177
Closed

Cancel button doesn't undo type change #122

kasijus opened this issue Sep 11, 2024 · 5 comments · Fixed by #177
Assignees
Labels
bug Something isn't working should do user request Requested by user

Comments

@kasijus
Copy link

kasijus commented Sep 11, 2024

Hi. I was wondering if this behavior was intended or if it's a bug: when I change a type of the value and then click the cancel button, it doesn't undo the type change. The issue can be seen in the recording below. I use version 1.16.1.

Screen.Recording.2024-09-11.164120.mp4
@kasijus kasijus added the bug Something isn't working label Sep 11, 2024
@CarlosNZ
Copy link
Owner

CarlosNZ commented Sep 11, 2024

Yeah, it's an issue I'm aware of. Personally, I've always dealt with it by having Undo functionality.

The problem is due to the fact that each node manages its own state until you "Submit" at which time the main data structure is updated. But when you change type, it does the update immediately since it needs to render a different component.

It's probably not too hard to fix, but will require a little tinkering with the state structure. So far no one had mentioned it, so I hadn't bothered. But thanks for pointing it out, I'll add it to the "To-Do" list.

@CarlosNZ CarlosNZ self-assigned this Sep 11, 2024
@CarlosNZ CarlosNZ added user request Requested by user should do labels Sep 11, 2024
@kasijus
Copy link
Author

kasijus commented Sep 12, 2024

Thanks @CarlosNZ for the feedback. I can also try to look into it and submit a PR, if that's ok.

@CarlosNZ
Copy link
Owner

Thanks @CarlosNZ for the feedback. I can also try to look into it and submit a PR, if that's ok.

Sure, good luck. I'll take a look in a week or two if no updates.

@CarlosNZ
Copy link
Owner

CarlosNZ commented Mar 8, 2025

Have merged a fix for this to the main branch -- will close this issue after next release

@CarlosNZ
Copy link
Owner

This is fixed now in v1.24.0

It's not quite perfect, as it does log two separate events in the Undo queue, but that's only relevant if you have an undo manager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working should do user request Requested by user
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants