Skip to content

Commit f9bd402

Browse files
fix[frontend](socai_module_config): fixed saving state handling
1 parent 54b99d0 commit f9bd402

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

frontend/src/app/app-module/guides/guide-soc-ai/guide-soc-ai.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ export class GuideSocAiComponent implements OnInit {
259259
this.providerFormCache[this.activeProvider] = {
260260
values: {...this.formValues},
261261
customModel: this.customModelValue,
262-
headers: [...this.headerRows.map(r => ({...r}))]
262+
headers: (this.headerRows||[]).map(r => ({...r}))
263263
};
264264

265265
this.activeProvider = event.nextId;
@@ -470,10 +470,12 @@ export class GuideSocAiComponent implements OnInit {
470470
}).subscribe(
471471
() => {
472472
this.saving = false;
473+
this.cdr.markForCheck()
473474
this.toast.showSuccessBottom('SOC AI configuration saved successfully');
474475
},
475476
(err) => {
476477
this.saving = false;
478+
this.cdr.markForCheck()
477479
if (err.status === 400) {
478480
const message = this.extractValidationError(err);
479481
this.toast.showError('Invalid Configuration', message);

0 commit comments

Comments
 (0)