[ML] Data Frame Analytics creation: ensure job config validity persists when switching from/to form/editor (#94654)
* persisted validation form state when switching from editor to form * persist complete form state when switching from json editor
This commit is contained in:
parent
881b9a5246
commit
e9627510fd
|
@ -558,8 +558,9 @@ export function reducer(state: State, action: Action): State {
|
|||
case ACTION.SWITCH_TO_FORM:
|
||||
const { jobConfig: config } = state;
|
||||
const { jobId } = state.form;
|
||||
// Persist form state when switching back from advanced editor
|
||||
// @ts-ignore
|
||||
const formState = getFormStateFromJobConfig(config, false);
|
||||
const formState = { ...state.form, ...getFormStateFromJobConfig(config, false) };
|
||||
|
||||
if (typeof jobId === 'string' && jobId.trim() !== '') {
|
||||
formState.jobId = jobId;
|
||||
|
|
Loading…
Reference in a new issue