1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

[CL-206] update bit-nav components to active match query params (#8242)

* remove exactMatch input in favor of routerLinkActiveOptions
This commit is contained in:
Will Martin
2024-03-11 11:22:04 -04:00
committed by GitHub
parent 687f0e590a
commit d66365fd53
6 changed files with 32 additions and 29 deletions

View File

@@ -1,5 +1,4 @@
import { Component, HostListener, Input, Optional } from "@angular/core";
import { IsActiveMatchOptions } from "@angular/router";
import { Component, HostListener, Optional } from "@angular/core";
import { BehaviorSubject, map } from "rxjs";
import { NavBaseComponent } from "./nav-base.component";
@@ -24,19 +23,6 @@ export class NavItemComponent extends NavBaseComponent {
protected get showActiveStyles() {
return this._isActive && !this.hideActiveStyles;
}
protected rlaOptions: IsActiveMatchOptions = {
paths: "subset",
queryParams: "exact",
fragment: "ignored",
matrixParams: "ignored",
};
/**
* if `true`, use `exact` match for path instead of `subset`.
*/
@Input() set exactMatch(val: boolean) {
this.rlaOptions.paths = val ? "exact" : "subset";
}
/**
* The design spec calls for the an outline to wrap the entire element when the template's anchor/button has :focus-visible.