1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 02:03:39 +00:00

UIF - Prefer signal & change detection (#16940)

This commit is contained in:
Oscar Hinton
2025-10-21 18:52:40 +02:00
committed by GitHub
parent d3fc20f8b9
commit 65da23feaa
135 changed files with 503 additions and 51 deletions

View File

@@ -3,6 +3,8 @@ import { NgControl, Validators } from "@angular/forms";
import { BitFormControlAbstraction } from "../form-control";
// 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: "input[type=checkbox][bitCheckbox]",
template: "",

View File

@@ -28,6 +28,8 @@ const template = /*html*/ `
</form>
`;
// 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: "app-example",
template,
@@ -38,10 +40,14 @@ class ExampleComponent {
checkbox: [false, Validators.requiredTrue],
});
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() set checked(value: boolean) {
this.formObj.patchValue({ checkbox: value });
}
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() set disabled(disable: boolean) {
if (disable) {
this.formObj.disable();