[tab] Ensure that correct tab panel is showing when sorting tabs.
This commit is contained in:
@@ -101,7 +101,6 @@ export function init(container = document, spacer = true, args = {}) {
|
||||
|
||||
const items = Array.from(ul.getElementsByTagName("li"));
|
||||
items.sort((a, b) => {
|
||||
console.log("here")
|
||||
const aa = order.indexOf(a.textContent.trim());
|
||||
const bb = order.indexOf(b.textContent.trim());
|
||||
|
||||
@@ -114,6 +113,7 @@ export function init(container = document, spacer = true, args = {}) {
|
||||
|
||||
ul.innerHTML = '';
|
||||
items.forEach(item => ul.appendChild(item));
|
||||
chooseTab(items[0]);
|
||||
}
|
||||
|
||||
tabGroup.querySelectorAll('[role="tab"]').forEach(tab => {
|
||||
|
||||
Reference in New Issue
Block a user