Fix subsequent delete checkbox state (#2587)

This commit is contained in:
RachelElysia 2021-10-22 11:19:34 -04:00 committed by GitHub
parent 4d2b098f39
commit 03d5de364d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -0,0 +1 @@
* Bug Fix: All app table checkboxes reset after subsequent deletes

View file

@ -43,7 +43,10 @@ const FlashMessage = ({
if (alertType === "success" && isVisible) {
// After 4 seconds, set hide to true.
const timer = setTimeout(() => setHide(true), 4000);
const timer = setTimeout(() => {
setHide(true);
onRemoveFlash(); // This function resets notifications which allows CoreLayout reset of selected rows
}, 4000);
// Return a cleanup function that will clear this reset, in case another render happens
// after this. We want that render to set a new timeout (if needed).
return () => clearTimeout(timer);