Skip to content

Commit a296bfa

Browse files
committed
feat: remove event payload
1 parent d70af22 commit a296bfa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/app/identity-form/identity-form.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<select
44
name="gender-identity"
55
[field]="identity().gender"
6-
(change)="maybeUpdateSalutationAndPronoun($event)"
6+
(change)="maybeUpdateSalutationAndPronoun()"
77
>
88
<option value="" selected>Please select</option>
99
<option value="male">Male</option>

src/app/identity-form/identity-form.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ export const identitySchema = schema<GenderIdentity>((path) => {
4141
export class IdentityForm {
4242
readonly identity = input.required<FieldTree<GenderIdentity>>();
4343

44-
protected maybeUpdateSalutationAndPronoun(event: Event) {
45-
const gender = (event.target as HTMLSelectElement).value;
44+
protected maybeUpdateSalutationAndPronoun() {
45+
const gender = this.identity().gender().value();
4646
if (gender !== 'diverse') {
4747
this.identity().salutation().value.set('');
4848
this.identity().pronoun().value.set('');

0 commit comments

Comments
 (0)