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:
@@ -53,6 +53,8 @@ describe("Button", () => {
|
||||
});
|
||||
});
|
||||
|
||||
// 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: "test-app",
|
||||
template: `
|
||||
|
||||
@@ -10,6 +10,8 @@ import {
|
||||
|
||||
let nextId = 0;
|
||||
|
||||
// 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-toggle-group",
|
||||
templateUrl: "./toggle-group.component.html",
|
||||
@@ -20,6 +22,8 @@ export class ToggleGroupComponent<TValue = unknown> {
|
||||
|
||||
readonly fullWidth = input<boolean, unknown>(undefined, { transform: booleanAttribute });
|
||||
readonly selected = model<TValue>();
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() selectedChange = new EventEmitter<TValue>();
|
||||
|
||||
@HostBinding("attr.role") role = "radiogroup";
|
||||
|
||||
@@ -45,6 +45,8 @@ describe("Toggle", () => {
|
||||
});
|
||||
});
|
||||
|
||||
// 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: "test-component",
|
||||
template: `
|
||||
|
||||
@@ -14,6 +14,8 @@ import { ToggleGroupComponent } from "./toggle-group.component";
|
||||
|
||||
let nextId = 0;
|
||||
|
||||
// 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-toggle",
|
||||
templateUrl: "./toggle.component.html",
|
||||
@@ -31,8 +33,8 @@ export class ToggleComponent<TValue> implements AfterContentChecked, AfterViewIn
|
||||
@HostBinding("tabIndex") tabIndex = "-1";
|
||||
@HostBinding("class") classList = ["tw-group/toggle", "tw-flex", "tw-min-w-16"];
|
||||
|
||||
protected bitBadgeContainerHasChidlren = signal(false);
|
||||
protected labelTitle = signal<string | null>(null);
|
||||
protected readonly bitBadgeContainerHasChidlren = signal(false);
|
||||
protected readonly labelTitle = signal<string | null>(null);
|
||||
|
||||
get name() {
|
||||
return this.groupComponent.name;
|
||||
|
||||
Reference in New Issue
Block a user