mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
UIF - Prefer signal & change detection (#16940)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { Component } from "@angular/core";
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
|
||||
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
||||
@Component({
|
||||
selector: "bit-item-action",
|
||||
imports: [],
|
||||
|
||||
@@ -29,7 +29,7 @@ import { TypographyModule } from "../typography";
|
||||
export class ItemContentComponent implements AfterContentChecked {
|
||||
readonly endSlot = viewChild<ElementRef<HTMLDivElement>>("endSlot");
|
||||
|
||||
protected endSlotHasChildren = signal(false);
|
||||
protected readonly endSlotHasChildren = signal(false);
|
||||
|
||||
/**
|
||||
* Determines whether text will truncate or wrap.
|
||||
|
||||
@@ -22,7 +22,7 @@ export class ItemComponent {
|
||||
/**
|
||||
* We have `:focus-within` and `:focus-visible` but no `:focus-visible-within`
|
||||
*/
|
||||
protected focusVisibleWithin = signal(false);
|
||||
protected readonly focusVisibleWithin = signal(false);
|
||||
@HostListener("focusin", ["$event.target"])
|
||||
onFocusIn(target: HTMLElement) {
|
||||
this.focusVisibleWithin.set(target.matches("[data-fvw-target]:focus-visible"));
|
||||
|
||||
Reference in New Issue
Block a user