mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 02:03:39 +00:00
Vault Refactor: Clean up some strict types (#12357)
* update cipher-view to account for strict type checking * update view-identity-sections to account for strict type checking * update read-only-cipher-card to account for strict type checking * remove unused card import * remove unused card import * update additional-options to account for strict type checking
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
// FIXME: Update this file to be type safe and remove this and next line
|
||||
// @ts-strict-ignore
|
||||
import { AfterViewInit, Component, ContentChildren, QueryList } from "@angular/core";
|
||||
|
||||
import { CardComponent, BitFormFieldComponent } from "@bitwarden/components";
|
||||
@@ -14,14 +12,16 @@ import { CardComponent, BitFormFieldComponent } from "@bitwarden/components";
|
||||
* A thin wrapper around the `bit-card` component that disables the bottom border for the last form field.
|
||||
*/
|
||||
export class ReadOnlyCipherCardComponent implements AfterViewInit {
|
||||
@ContentChildren(BitFormFieldComponent) formFields: QueryList<BitFormFieldComponent>;
|
||||
@ContentChildren(BitFormFieldComponent) formFields?: QueryList<BitFormFieldComponent>;
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
// Disable the bottom border for the last form field
|
||||
if (this.formFields.last) {
|
||||
if (this.formFields?.last) {
|
||||
// Delay model update until next change detection cycle
|
||||
setTimeout(() => {
|
||||
this.formFields.last.disableReadOnlyBorder = true;
|
||||
if (this.formFields) {
|
||||
this.formFields.last.disableReadOnlyBorder = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user