mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 09:50:31 +01:00
generic polling
This commit is contained in:
parent
b6048a7f91
commit
104a72fcc9
@ -42,6 +42,12 @@ let AccordionListItem = React.createClass({
|
||||
}
|
||||
},
|
||||
|
||||
componentDidUpdate() {
|
||||
if(this.props.content.num_editions === 0) {
|
||||
this.startPolling();
|
||||
}
|
||||
},
|
||||
|
||||
onChange(state) {
|
||||
this.setState(state);
|
||||
},
|
||||
@ -73,6 +79,10 @@ let AccordionListItem = React.createClass({
|
||||
|
||||
this.toggleCreateEditionsDialog();
|
||||
|
||||
this.startPolling();
|
||||
},
|
||||
|
||||
startPolling() {
|
||||
// start polling until editions are defined
|
||||
let pollingIntervalIndex = setInterval(() => {
|
||||
EditionListActions.fetchEditionList(this.props.content.id)
|
||||
|
Loading…
Reference in New Issue
Block a user