Can Transform.SetNodes be called and adjust values immediately? #4945
Unanswered
MeikyuuTrader
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to modify the slatejs element values to insert an id and that can only be done via Transforms. I want to use the newly added ID to save my data via an API call, however, that ID doesn't get set until after the onChange loop finishes.
See below for abbreviated basic slate editor code.
Is there anyway for me to call Transforms.setNodes, and then immediately after, in onChange, use that ID? I can't modify the ID parameter in descendent as it's read only.
Only other way I think that I'd need to deep clone the slate elements, then modify that, since it won't be read-only anymore.
Beta Was this translation helpful? Give feedback.
All reactions