File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
apps/back-office/src/app/dashboard/pages/api-configuration Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -103,9 +103,8 @@ export class ApiConfigurationComponent
103103 this . apiConfiguration . name as string
104104 ) ;
105105 this . apiForm = this . createApiForm ( data . apiConfiguration ) ;
106- this . apiForm
107- . get ( 'authType' )
108- ?. valueChanges . pipe ( takeUntil ( this . destroy$ ) )
106+ this . apiForm . controls . authType ?. valueChanges
107+ . pipe ( takeUntil ( this . destroy$ ) )
109108 . subscribe ( ( value ) => {
110109 this . resetFormSettings ( value ) ;
111110 } ) ;
@@ -162,9 +161,9 @@ export class ApiConfigurationComponent
162161 * @param authType current auth type of the API configuration
163162 */
164163 private resetFormSettings ( authType : string ) {
165- this . apiForm . controls . settings . clearValidators ( ) ;
166- this . apiForm . controls . settings = this . buildSettingsForm ( authType ) ;
167- this . apiForm . controls . settings . updateValueAndValidity ( ) ;
164+ ( this . apiForm as any ) . removeControl ( 'settings' , { emitEvent : false } ) ;
165+ this . apiForm . addControl ( ' settings' , this . buildSettingsForm ( authType ) ) ;
166+ this . apiForm . updateValueAndValidity ( ) ;
168167 }
169168
170169 /**
You can’t perform that action at this time.
0 commit comments