Preserve undo history after clearing properties tab
Describe the bug
Hello again 👋🏻 (can you tell I'm finally using the extension properly? 😂 It's super great btw).
If you clear the Properties input using the refresh icon, you cannot get back what you have with cmd + z. It would be great to preserve history to undo a clear done by mistake.
[aside] I have hit this a few times now accidentally thinking it would refresh the page. I would consider changing the icon to something like a 🚫 or a 🗑
Reproduction
- Open the Properties pane in text mode
- Type some properties in
- Clear with clear button
- Try to undo with cmd + z
Preview.js version
v1.11.0
Framework
React 17
System Info
MacOS 12.5
VS Code 1.70.1
Used Package Manager
yarn
Extension logs (useful for crashes)
No response
Preview logs (useful for rendering errors)
No response
Repo link (if available)
No response
Anything else?
No response
Good idea! Would you imagine Cmd+Z working with the structured props editor too?
Yes, that would be ideal!
Also, is it a known bug that functions don't really work in the GUI props editor? I can't really do much with them there and have to use the code view to input them. I can open a new issue if not
At the moment function props can only return a value, they can't have a body. Probably worth opening another issue for this explaining your use case for it!
Will do, thanks!