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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user