File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33 < select
44 name ="gender-identity "
55 [field] ="identity().gender "
6- (change) ="maybeUpdateSalutationAndPronoun () "
6+ (change) ="updateSalutationAndPronoun () "
77 >
88 < option value ="" selected > Please select</ option >
99 < option value ="male "> Male</ option >
Original file line number Diff line number Diff line change @@ -42,14 +42,10 @@ export const identitySchema = schema<GenderIdentity>((path) => {
4242export class IdentityForm {
4343 readonly identity = input . required < FieldTree < GenderIdentity > > ( ) ;
4444
45- protected maybeUpdateSalutationAndPronoun ( ) {
46- const gender = this . identity ( ) . gender ( ) . value ( ) ;
47- if ( gender !== 'diverse' ) {
48- this . identity ( ) . salutation ( ) . value . set ( '' ) ;
49- this . identity ( ) . pronoun ( ) . value . set ( '' ) ;
50- } else {
51- this . identity ( ) . salutation ( ) . reset ( ) ;
52- this . identity ( ) . pronoun ( ) . reset ( ) ;
53- }
45+ protected updateSalutationAndPronoun ( ) {
46+ this . identity ( ) . salutation ( ) . value . set ( '' ) ;
47+ this . identity ( ) . salutation ( ) . reset ( ) ;
48+ this . identity ( ) . pronoun ( ) . value . set ( '' ) ;
49+ this . identity ( ) . pronoun ( ) . reset ( ) ;
5450 }
5551}
You can’t perform that action at this time.
0 commit comments