Wizard: Fix blueprint name update on Architecture/Distribution changes
This commit resolves an issue where the blueprint name did not update when the user changed the Architecture or Distribution. Additionally, it sets an initial value for blueprintName in the WizardSlice.
This commit is contained in:
parent
b2255de04e
commit
978237bf84
8 changed files with 96 additions and 64 deletions
|
|
@ -16,8 +16,8 @@ import {
|
|||
changeBlueprintName,
|
||||
selectBlueprintDescription,
|
||||
selectBlueprintName,
|
||||
setIsCustomName,
|
||||
} from '../../../../store/wizardSlice';
|
||||
import { useGenerateDefaultName } from '../../utilities/useGenerateDefaultName';
|
||||
import { useDetailsValidation } from '../../utilities/useValidation';
|
||||
import { ValidatedInputAndTextArea } from '../../ValidatedInput';
|
||||
|
||||
|
|
@ -26,13 +26,12 @@ const DetailsStep = () => {
|
|||
const blueprintName = useAppSelector(selectBlueprintName);
|
||||
const blueprintDescription = useAppSelector(selectBlueprintDescription);
|
||||
|
||||
useGenerateDefaultName();
|
||||
|
||||
const handleNameChange = (
|
||||
_event: React.FormEvent<HTMLInputElement | HTMLTextAreaElement>,
|
||||
name: string
|
||||
) => {
|
||||
dispatch(changeBlueprintName(name));
|
||||
dispatch(setIsCustomName());
|
||||
};
|
||||
|
||||
const handleDescriptionChange = (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue