[#77] fixed when getEventAsync is dispatched to prevent missing data
This commit is contained in:
@@ -182,13 +182,7 @@ export default function EventDisplayModal({
|
||||
onClose({}, "backdropClick");
|
||||
};
|
||||
|
||||
const [detailsLoaded, setDetailsLoaded] = useState(false);
|
||||
|
||||
const handleToggleShowMore = async () => {
|
||||
if (!detailsLoaded) {
|
||||
await dispatch(getEventAsync(event));
|
||||
setDetailsLoaded(true);
|
||||
}
|
||||
setShowMore(!showMore);
|
||||
};
|
||||
|
||||
|
||||
@@ -136,6 +136,7 @@ export default function EventPreviewModal({
|
||||
size="small"
|
||||
onClick={async () => {
|
||||
setOpenFullDisplay(!openFullDisplay);
|
||||
await dispatch(getEventAsync(event));
|
||||
}}
|
||||
>
|
||||
<EditIcon fontSize="small" />
|
||||
|
||||
Reference in New Issue
Block a user