diff --git a/source/components/form/tabs.mjs b/source/components/form/tabs.mjs index 8da8affd14d30b9c61c88639d1b38a87413f5a39..2d1c1137cc501854c0337413a2687ef52d91d233 100644 --- a/source/components/form/tabs.mjs +++ b/source/components/form/tabs.mjs @@ -392,7 +392,7 @@ function togglePopper() { /** * @private */ -function attachResizeObserver() {; +function attachResizeObserver() { // against flickering this[resizeObserverSymbol] = new ResizeObserver((entries) => { @@ -417,7 +417,7 @@ function attachResizeObserver() {; /** * @private */ -function attachTabChangeObserver() {; +function attachTabChangeObserver() { // against flickering new MutationObserver((mutations) => { @@ -504,6 +504,7 @@ function show(element) { const nodes = getSlottedElements.call(this); for (const node of nodes) { const id = node.getAttribute("id"); + if (id === reference) { node.classList.add("active"); @@ -518,7 +519,12 @@ function show(element) { } const options = this.getOption("fetch", {}); - loadAndAssignContent(node, url, options); + const filter = undefined; + loadAndAssignContent(node, url, options,filter).then(() => { + + }).catch(e=>{ + addAttributeToken(this, ATTRIBUTE_ERRORMESSAGE, e.message); + }); } } else { node.classList.remove("active"); @@ -526,14 +532,14 @@ function show(element) { } const standardButtons = this.getOption("buttons.standard"); - for (const [index] in standardButtons) { + for (const index in standardButtons) { const button = standardButtons[index]; const state = button["reference"] === reference ? "active" : "inactive"; this.setOption(`buttons.standard.${index}.state`, state); } const popperButton = this.getOption("buttons.popper"); - for (const [index] in popperButton) { + for (const index in popperButton) { const button = popperButton[index]; const state = button["reference"] === reference ? "active" : "inactive"; this.setOption(`buttons.popper.${index}.state`, state); @@ -773,7 +779,7 @@ function initTabButtons() {; }); } - return; + return Promise.resolve(); }); }