mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[ML] Data Frame Analytics creation: ensure job config validity persists when switching from/to form/editor (#94654) (#95329)
* 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
8be5e991fd
commit
fc11cd3de2
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue