Is there way to switch tabs on Dialog/Form ?
I searched forum, but my this.tabs is undefined so
this.tabs.tabs('option', 'active', 2);
did not work
neither did this:
Serenity.TabsExtensions.selectTab(this.tabs, "Licences");
I have feeling these work for tabs defined in html template, not tabs generated from Forms declarations.any idea how to switch between those of Form?
export function selectEditorTab(editor: Serenity.Widget<any>) {
let tabId = editor.element.closest('.tab-pane').attr('id');
let tabAnchor = editor.element.closest('.s-PropertyGrid').find(`a[href='#${tabId}']`);
(tabAnchor as any).tab('show');
}
usage
selectEditorTab(this.form.aEditorInThatTab);
worked, thx
Most helpful comment
usage
selectEditorTab(this.form.aEditorInThatTab);