Hello, I'm currently building a node and it's possible to that i can have an async validation on certain fields that would run during saving of node properties in edit dialog.
So i was asking is it possible to stop it from closing until I'm done?
the other option would be to validate the node after deploy but wanted to make it visible to the user ASAP.
i used you idea of disable the button and created a new button (using .clone from jQuery) from Done and hide the original and run the code i need then fire the click event on Done.
but the validation that i run for example (the user can enter an existing id on DB) i need to validate that it's valid.
i already have a registered API that return true or false based on ID.
the issue is all validate method (either in defaults or typedInput) are sync methods that doesn't wait for any asynchronous action to check if it's valid or not.
my other solution would have been loading all the ID and check if it's in them.
but with the replace Done button with my own that is a nice solution for me.
And make sure to advise in your read me that you hack the editor, to achieve what you need.
so they know to report on your GitHub issues page when a problem occurs in the editor window, instead of here.
Sorry - that was a little spicy i know, but I'm not a fan of hacking the editor.
Depending on what you are allowing in the typed input, it might never be possible to validate in the Editor.
Then all you need to do is call that using a synchronous XHR request, you don't need async at all unless that API is super slow.
I have similar API's in UIBUILDER and this is how I do it.
Sounds like you probably don't need to use Typed Input either - that is a large overhead if you aren't using its features and if you are, you might well have inputs that can only be validated by the runtime and not in the editor.