e2corporation commented on issue #2923:
URL:
https://github.com/apache/incubator-devlake/issues/2923#issuecomment-1234432431
I am trying to Screen record it GiFox not capturing correctly. Part of the
problem with ToastNotifications is that since the savePromise was added you
need to move the setTimeout to inside the promise. This is causing conflicts
with Toast behavior.
Lines 300 - 302 should get deleted, the timeout should not be calling these
setters since it's now being handled in the promise. setShowError, setIsSaving,
setSaveComplete shouldnt be in the Timeout anymore.
```
setTimeout(() => {
if (!saveResponse.success || errors.length !== 0) {
ToastNotification.show({
message: 'Connection failed to save, please try again.',
intent: 'danger',
icon: 'error',
})
// DELETE These 3 lines
setShowError(true)
setIsSaving(false)
setSaveComplete(false)
}
}, 2000)
```
<img width="748" alt="Screen Shot 2022-09-01 at 11 20 19 AM"
src="https://user-images.githubusercontent.com/1742233/187951210-e8041438-1243-43c7-bc13-ad16a9b62d1c.png">
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]