Returning single instance events when no recurring
This commit is contained in:
parent
3d0e617e5b
commit
aff8e71649
|
@ -308,11 +308,19 @@ export default class GraphCalendar extends React.Component<IGraphCalendarProps,
|
||||||
if (this.props.showRecurrence) {
|
if (this.props.showRecurrence) {
|
||||||
//Get recurring events and merge with the other (standard) events
|
//Get recurring events and merge with the other (standard) events
|
||||||
this._getRecurringMaster(startDate, endDate).then((recData: Array<EventInput>) => {
|
this._getRecurringMaster(startDate, endDate).then((recData: Array<EventInput>) => {
|
||||||
this._getRecurrentEvents(recData, startDate, endDate).then((recEvents: Array<EventInput>) => {
|
|
||||||
this.setState({
|
if(recData.length > 0) {
|
||||||
events: [...recEvents, ...events].slice(0, this.props.limit),
|
this._getRecurrentEvents(recData, startDate, endDate).then((recEvents: Array<EventInput>) => {
|
||||||
|
this.setState({
|
||||||
|
events: [...recEvents, ...events].slice(0, this.props.limit),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
} else {
|
||||||
|
this.setState({
|
||||||
|
events: events,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
//Show only (standard) events
|
//Show only (standard) events
|
||||||
|
|
Loading…
Reference in New Issue