|
@@ -50,6 +50,7 @@ function Manual(props) {
|
50
|
50
|
const [open, setOpen] = React.useState(false);
|
51
|
51
|
const [date, setDate] = React.useState(new Date());
|
52
|
52
|
const [tab, setTab] = React.useState(0);
|
|
53
|
+ const [checklist, setChecklist] = React.useState([]);
|
53
|
54
|
|
54
|
55
|
const handleClose = () => false
|
55
|
56
|
|
|
@@ -112,8 +113,9 @@ function Manual(props) {
|
112
|
113
|
if(check){
|
113
|
114
|
temp = [...pruebas, {id}]
|
114
|
115
|
}else{
|
115
|
|
- temp = pruebas.filter((test) => test.id !== id);
|
|
116
|
+ temp = pruebas.filter( test => test.id !== id);
|
116
|
117
|
}
|
|
118
|
+ setChecklist( temp.map( test => test.id) )
|
117
|
119
|
setValues({...values, pruebas: temp})
|
118
|
120
|
};
|
119
|
121
|
|
|
@@ -149,6 +151,7 @@ function Manual(props) {
|
149
|
151
|
key={test.id}
|
150
|
152
|
control={
|
151
|
153
|
<Checkbox
|
|
154
|
+ checked={checklist.includes((test.id))}
|
152
|
155
|
onChange={(event)=> addPrueba(event.target.checked,test.id)}
|
153
|
156
|
/>
|
154
|
157
|
}
|