mirror of
				https://github.com/datahub-project/datahub.git
				synced 2025-10-31 10:49:00 +00:00 
			
		
		
		
	fix(ui ingestion): fixing issue where stale fields could stick around when changing recipes (#8421)
This commit is contained in:
		
							parent
							
								
									620d23d623
								
							
						
					
					
						commit
						cf8e44b69a
					
				| @ -45,12 +45,14 @@ export const DefineRecipeStep = ({ state, updateState, goTo, prev, ingestionSour | ||||
|     const placeholderRecipe = getPlaceholderRecipe(ingestionSources, type); | ||||
| 
 | ||||
|     const [stagedRecipeYml, setStagedRecipeYml] = useState(existingRecipeYaml || placeholderRecipe); | ||||
|     const [stagedRecipeName, setStagedRecipeName] = useState(state.name); | ||||
| 
 | ||||
|     useEffect(() => { | ||||
|         if (existingRecipeYaml) { | ||||
|             setStagedRecipeName(state.name); | ||||
|             setStagedRecipeYml(existingRecipeYaml); | ||||
|         } | ||||
|     }, [existingRecipeYaml]); | ||||
|     }, [existingRecipeYaml, state.name]); | ||||
| 
 | ||||
|     const [stepComplete, setStepComplete] = useState(false); | ||||
| 
 | ||||
| @ -97,6 +99,7 @@ export const DefineRecipeStep = ({ state, updateState, goTo, prev, ingestionSour | ||||
|     if (type && CONNECTORS_WITH_FORM.has(type)) { | ||||
|         return ( | ||||
|             <RecipeBuilder | ||||
|                 key={stagedRecipeName} | ||||
|                 state={state} | ||||
|                 isEditing={isEditing} | ||||
|                 displayRecipe={displayRecipe} | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Gabe Lyons
						Gabe Lyons