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

How do I set a strict type allowed for customizeNode #35

Open
sbolla2 opened this issue Feb 21, 2024 · 3 comments
Open

How do I set a strict type allowed for customizeNode #35

sbolla2 opened this issue Feb 21, 2024 · 3 comments

Comments

@sbolla2
Copy link

sbolla2 commented Feb 21, 2024

Say I want to make sure when a specific node is edited, its type remains unchanged (for example, boolean -> boolean: true -> false), so I shouldn't be able to change its type into a string, number, object, null, or array. How can I customize options for this, is it possible?

@YYsuni
Copy link
Owner

YYsuni commented Feb 21, 2024

For now, node changes only emit onEdit/onChange event, and you can't prevent the edition. But, you could revert it and warn user for it, onEdit event will provide some useful params.

@hrodriguezv
Copy link

I'm trying to integrate this component into an application and everything works fine except when editing. In the onEdit event the value that should come in newValue variable, is coming in undefined. Is there any additional configuration I need to do to fix this behavior?

@YYsuni
Copy link
Owner

YYsuni commented Mar 13, 2024

hrodriguezv

Can you provide some code demo or gif/mp4?

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

3 participants