File tree Expand file tree Collapse file tree 3 files changed +1
-4
lines changed
tools/work/work-self-service/intake-forms/bug-hunt Expand file tree Collapse file tree 3 files changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,6 @@ export async function onSubmitAsync<T>(
7979
8080 // get the dirty fields before we validate b/c validation marks them dirty on submit
8181 const dirty : FormInputModel | undefined = inputs ?. find ( fieldDef => ! ! fieldDef . dirty )
82- const pristine : FormInputModel | undefined = inputs ?. find ( fieldDef => ! ! fieldDef . pristine )
8382 // if there are any validation errors, display a message and stop submitting
8483 // NOTE: need to check this before we check if the form is dirty bc you
8584 // could have a form that's not dirty but has errors and you wouldn't
@@ -99,7 +98,7 @@ export async function onSubmitAsync<T>(
9998 } )
10099
101100 // if there are no dirty fields, don't actually perform the save
102- const savePromise : Promise < void > = ! dirty && ! pristine ? Promise . resolve ( ) : save ( formValue )
101+ const savePromise : Promise < void > = ! dirty ? Promise . resolve ( ) : save ( formValue )
103102
104103 return savePromise
105104 . then ( ( ) => {
Original file line number Diff line number Diff line change @@ -43,7 +43,6 @@ export interface FormInputModel {
4343 readonly notTabbable ?: boolean
4444 options ?: ReadonlyArray < FormRadioButtonOption >
4545 readonly placeholder ?: string
46- pristine ?: boolean
4746 readonly spellCheck ?: boolean
4847 readonly title ?: string
4948 touched ?: boolean
Original file line number Diff line number Diff line change @@ -43,7 +43,6 @@ export const BugHuntFormConfig: FormDefinition = {
4343 label : 'Project title' ,
4444 name : ChallengeMetadataName . projectTitle ,
4545 placeholder : 'Enter a descriptive title' ,
46- pristine : true ,
4746 type : 'text' ,
4847 validators : [
4948 {
You can’t perform that action at this time.
0 commit comments