Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
VILLASframework
VILLASweb
Commits
3f03dc98
Commit
3f03dc98
authored
Jul 24, 2019
by
Sonja Happ
Browse files
refresh only if no edit or delete dialog is open
parent
d4c1f3cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/containers/simulators.js
View file @
3f03dc98
...
...
@@ -96,7 +96,7 @@ class Simulators extends Component {
});
// Start timer for periodic refresh
this
.
timer
=
window
.
setInterval
(()
=>
this
.
refresh
(),
1000
0
);
this
.
timer
=
window
.
setInterval
(()
=>
this
.
refresh
(),
1000
);
}
componentWillUnmount
()
{
...
...
@@ -104,11 +104,17 @@ class Simulators extends Component {
}
refresh
()
{
AppDispatcher
.
dispatch
({
type
:
'
simulators/start-load
'
,
token
:
this
.
state
.
sessionToken
,
userid
:
this
.
state
.
sessionUserID
});
if
(
this
.
state
.
editModal
||
this
.
state
.
deleteModal
){
// do nothing since a dialog is open at the moment
}
else
{
AppDispatcher
.
dispatch
({
type
:
'
simulators/start-load
'
,
token
:
this
.
state
.
sessionToken
,
userid
:
this
.
state
.
sessionUserID
});
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment