diff --git a/client/src/components/LabelsStep/AddStep.jsx b/client/src/components/LabelsStep/AddStep.jsx
index 5b1ffbc0..c395c83e 100755
--- a/client/src/components/LabelsStep/AddStep.jsx
+++ b/client/src/components/LabelsStep/AddStep.jsx
@@ -10,12 +10,13 @@ import Editor from './Editor';
import styles from './AddStep.module.scss';
-const AddStep = React.memo(({ onCreate, onBack, initialValue }) => {
+const AddStep = React.memo(({ defaultData, onCreate, onBack }) => {
const [t] = useTranslation();
const [data, handleFieldChange] = useForm(() => ({
- name: initialValue,
+ name: '',
color: LabelColors[0],
+ ...defaultData,
}));
const handleSubmit = useCallback(() => {
@@ -46,9 +47,9 @@ const AddStep = React.memo(({ onCreate, onBack, initialValue }) => {
});
AddStep.propTypes = {
+ defaultData: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types
onCreate: PropTypes.func.isRequired,
onBack: PropTypes.func.isRequired,
- initialValue: PropTypes.func.isRequired,
};
export default AddStep;
diff --git a/client/src/components/LabelsStep/LabelsStep.jsx b/client/src/components/LabelsStep/LabelsStep.jsx
index 7307cb97..3b46feb5 100755
--- a/client/src/components/LabelsStep/LabelsStep.jsx
+++ b/client/src/components/LabelsStep/LabelsStep.jsx
@@ -84,7 +84,15 @@ const LabelsStep = React.memo(
if (step) {
switch (step.type) {
case StepTypes.ADD:
- return ;
+ return (
+
+ );
case StepTypes.EDIT: {
const currentItem = items.find((item) => item.id === step.params.id);