pull/84/head
jimmys-box 2 years ago
parent 935c30e57f
commit ac442d1113

@ -82,8 +82,8 @@ const CandidateField = ({avatar, label, description, candIndex, onDelete, onAdd,
setCreateObjectURL(URL.createObjectURL(i));
}
};
const test = {...inputProps};
console.log(test);
return (
<Row className="rowNoMargin">
<div className={className}>

@ -53,8 +53,7 @@ const CandidatesField = ({onChange}) => {
const removeCandidate = index => {
if (candidates.length === 1) {
const newCandidates = []
newCandidates.push({label: "", description: "", fieldRef: createRef()});
newCandidates.push({label: "", description: "", fieldRef: createRef()});
newCandidates.push({label: "", fieldRef: createRef()});
setCandidates(newCandidates);
onChange(newCandidates)
}
@ -65,9 +64,8 @@ const CandidatesField = ({onChange}) => {
}
};
const editCandidate = (index, label, description) => {
const editCandidate = (index, label) => {
candidates[index].label = label
candidates[index].description = description
setCandidates([...candidates]);
onChange(candidates);
};

@ -543,9 +543,6 @@ const CreateElection = (props) => {
</Label>
))}
</div>
</Col>
<Col

Loading…
Cancel
Save