mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +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) {
|
onChange(state) {
|
||||||
this.setState(state);
|
this.setState(state);
|
||||||
},
|
},
|
||||||
@ -73,6 +79,10 @@ let AccordionListItem = React.createClass({
|
|||||||
|
|
||||||
this.toggleCreateEditionsDialog();
|
this.toggleCreateEditionsDialog();
|
||||||
|
|
||||||
|
this.startPolling();
|
||||||
|
},
|
||||||
|
|
||||||
|
startPolling() {
|
||||||
// start polling until editions are defined
|
// start polling until editions are defined
|
||||||
let pollingIntervalIndex = setInterval(() => {
|
let pollingIntervalIndex = setInterval(() => {
|
||||||
EditionListActions.fetchEditionList(this.props.content.id)
|
EditionListActions.fetchEditionList(this.props.content.id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user