@resolveio/client-lib-core 1.3.3 → 1.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4835,8 +4835,8 @@ class NavbarModuleComponent extends BaseComponent {
4835
4835
  this.selectedTab = this.menuData.tabs[0];
4836
4836
  }
4837
4837
  else {
4838
- this.selectedTab = null;
4839
4838
  this.currentRoute = this._services._router.url.replace(/\/[a-f0-9]{24}$/, '').replace(/\?.+$/, '');
4839
+ this.selectedTab = null;
4840
4840
  for (let i = 0; i < this.menuData.tabs.length; i++) {
4841
4841
  let tab = this.menuData.tabs[i];
4842
4842
  if (tab.link === this.currentRoute) {
@@ -4844,6 +4844,16 @@ class NavbarModuleComponent extends BaseComponent {
4844
4844
  break;
4845
4845
  }
4846
4846
  }
4847
+ while (!this.selectedTab && this.currentRoute.includes('/')) {
4848
+ this.currentRoute = this.currentRoute.replace(/(\/[^\/]+$)/, '');
4849
+ for (let i = 0; i < this.menuData.tabs.length; i++) {
4850
+ let tab = this.menuData.tabs[i];
4851
+ if (tab.link === this.currentRoute) {
4852
+ this.selectedTab = tab;
4853
+ break;
4854
+ }
4855
+ }
4856
+ }
4847
4857
  }
4848
4858
  }
4849
4859
  }
@@ -4852,10 +4862,8 @@ class NavbarModuleComponent extends BaseComponent {
4852
4862
  if (this.selectedTab.label === tab.label) {
4853
4863
  return 'active';
4854
4864
  }
4855
- else {
4856
- return '';
4857
- }
4858
4865
  }
4866
+ return '';
4859
4867
  }
4860
4868
  navigateTo(tab) {
4861
4869
  if (this.selectedTab !== tab) {