Skip to content

Commit e9f6826

Browse files
committed
Reopen the error dialog when new errors happen
1 parent 4c6d2df commit e9f6826

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

dash/dash-renderer/src/components/error/menu/DebugMenu.react.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, {useState} from 'react';
1+
import React, {useEffect, useState} from 'react';
22
import PropTypes from 'prop-types';
33
import {concat} from 'ramda';
44

@@ -102,6 +102,12 @@ const DebugMenu = ({error, hotReload, config, children}) => {
102102
const errCount = error.frontEnd.length + error.backEnd.length;
103103
const connected = error.backEndConnected;
104104

105+
useEffect(() => {
106+
if (errCount > 0 && popup == null) {
107+
setPopup('errors');
108+
}
109+
}, [errCount]);
110+
105111
const toggleErrors = () => {
106112
setPopup(popup == 'errors' ? null : 'errors');
107113
};

0 commit comments

Comments
 (0)