Hello,
Quick question: Is it possible to programmatically switch to the preview tab via dialogApi.switchTab('preview')
or similar?
best,
Owen
Hello,
Quick question: Is it possible to programmatically switch to the preview tab via dialogApi.switchTab('preview')
or similar?
best,
Owen
Hi @owenhoskins
Yes, the dialog.switchTab()
method does the trick.
For example, the following code makes the widget open the “preview” tab initially. Actually, you’ll see an empty tab if no files uploaded.
var widget = uploadcare.Widget('[role=uploadcare-uploader]');
widget.onDialogOpen(function (dialog) {
dialog.switchTab('preview');
});
Thanks for the sanity check! I actually tested this but somehow typed showTab()