Skip to content

Commit bc150a3

Browse files
committed
fix(react,angular): Propagate input type field
1 parent 2849881 commit bc150a3

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

packages/angular/src/lib/auth/forms/sign-in-auth-form.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,13 @@ import {
5353
></fui-form-input>
5454
</fieldset>
5555
<fieldset>
56-
<fui-form-input name="password" tanstack-app-field [tanstackField]="form" label="{{ passwordLabel() }}">
56+
<fui-form-input
57+
name="password"
58+
tanstack-app-field
59+
[tanstackField]="form"
60+
label="{{ passwordLabel() }}"
61+
type="password"
62+
>
5763
@if (forgotPassword) {
5864
<button fui-form-action (click)="forgotPassword.emit()">
5965
{{ forgotPasswordLabel() }}

packages/angular/src/lib/auth/forms/sign-up-auth-form.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ import {
5757
tanstack-app-field
5858
[tanstackField]="form"
5959
label="{{ passwordLabel() }}"
60+
type="password"
6061
></fui-form-input>
6162
</fieldset>
6263
@if (requireDisplayNameField()) {

packages/angular/src/lib/components/form.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export class FormMetadataComponent {
3333
<span>{{ label() }}</span>
3434
<input
3535
[attr.aria-invalid]="field.api.state.meta.isTouched && field.api.state.meta.errors.length > 0"
36+
[type]="type()"
3637
[id]="field.api.name"
3738
[name]="field.api.name"
3839
[value]="field.api.state.value"
@@ -47,6 +48,7 @@ export class FormMetadataComponent {
4748
export class FormInputComponent {
4849
field = injectField<string>();
4950
label = input.required<string>();
51+
type = input<string>("text");
5052
}
5153

5254
@Component({

packages/react/src/components/form.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ function Input(props: PropsWithChildren<ComponentProps<"input"> & { label: strin
2828
<div data-input-group>
2929
{props.before}
3030
<input
31+
{...props}
3132
aria-invalid={field.state.meta.isTouched && field.state.meta.errors.length > 0}
3233
id={field.name}
3334
name={field.name}

0 commit comments

Comments
 (0)