Remember if the Attendance is open
This commit is contained in:
parent
d5b8ffa0e2
commit
2ff436eef5
|
@ -130,9 +130,11 @@ function AttendanceRow(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let attendanceOpenCache = false;
|
||||||
|
|
||||||
export function InstructorClassAttendance(props) {
|
export function InstructorClassAttendance(props) {
|
||||||
const { clazz, token, refreshClass, user } = props;
|
const { clazz, token, refreshClass, user } = props;
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(attendanceOpenCache);
|
||||||
const [input, setInput] = useState({});
|
const [input, setInput] = useState({});
|
||||||
const [error, setError] = useState(false);
|
const [error, setError] = useState(false);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
|
@ -213,7 +215,7 @@ export function InstructorClassAttendance(props) {
|
||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
<Button onClick={() => setOpen(true)}>
|
<Button onClick={() => {setOpen(true); attendanceOpenCache = true;}}>
|
||||||
Edit Attendance
|
Edit Attendance
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user