1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

[PS-960] Fix form input group suffix not working (#2947)

* Fix form suffix not working without prefix

* Use tailwind first/last to avoid hacky components
This commit is contained in:
Oscar Hinton
2022-06-23 20:24:26 +02:00
committed by GitHub
parent fcdf36a01c
commit 6e9b6f25a1
6 changed files with 10 additions and 33 deletions

View File

@@ -31,17 +31,6 @@ export class BitFormFieldComponent implements AfterContentChecked {
@ContentChildren(BitSuffixDirective) suffixChildren: QueryList<BitSuffixDirective>;
ngAfterContentChecked(): void {
this.input.hasPrefix = this.prefixChildren.length > 0;
this.input.hasSuffix = this.suffixChildren.length > 0;
this.prefixChildren.forEach((prefix) => {
prefix.first = prefix == this.prefixChildren.first;
});
this.suffixChildren.forEach((suffix) => {
suffix.last = suffix == this.suffixChildren.last;
});
if (this.error) {
this.input.ariaDescribedBy = this.error.id;
} else if (this.hint) {