Closed ajaykr089 closed 7 years ago
No, there is no way to do this with vex currently.
Purely hypothetical, but I think there could be a solution with providing a Promise to the message
or input
options, like so:
vex.dialog.open({
message: fetch('/contentUrl').then(resp => resp.text())
})
And vex would be able to internally detect that the content is asynchronous, and be able to show a loading spinner or something.
Closing the issue because the answer is "no", but I'd love to hear your thoughts on the Promise idea.
Hey,
I was trying to load some dynamic content using the "vex.dialogs" method, but right now i have to make separate ajax request for the content and then popup loads up, that is show some delay time opening the popup due to ajax request time, Is there any method in the library that can do the ajax job internally?