Open specific tab from hyperlink

This commit is contained in:
Paweł Balicki
2021-01-05 10:42:48 +01:00
parent 0e49011cb1
commit ee34b1fcb8
2 changed files with 11 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
const locationHash = window.location.hash;
if (locationHash) {
const tabsList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tab"]'));
const matchedTabs = tabsList.filter(tab => tab.hash === locationHash);
matchedTabs.map(tab => {
new bootstrap.Tab(tab).show();
});
}
+1
View File
@@ -3,6 +3,7 @@
import './autosize';
import './input-mask';
import './dropdown';
import './tab';
(function() {
/**