diff --git a/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/state.ts b/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/state.ts index bef5b35624df4..99f95a3eee039 100644 --- a/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/state.ts +++ b/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/state.ts @@ -51,7 +51,11 @@ export const reducer = (state: State, action: Action): State => { case 'SET_IS_GENERATING': return { ...state, isGenerating: action.payload }; case 'SET_GENERATED_RESULT': - return { ...state, result: action.payload }; + return { + ...state, + // keep original result as the samplesFormat is not always included in the payload + result: state.result ? { ...state.result, ...action.payload } : action.payload, + }; default: return state; }