Closed marcos-lancy closed 4 years ago
The data load, however when changing between day, month, year, no longer load data.
`constructor(props) { super(props); var arrRe = []
let schedulerData = new SchedulerData('2020-6-12', ViewTypes.Week, false, false, {}); schedulerData.localeMoment.locale('pt-br'); schedulerData.setResources(arrRe); schedulerData.setEvents(arrRe); this.state = { viewModel: schedulerData, } } async componentDidMount() { const responseRecurso = await ApiService.get('funcionarios'); var recursos = responseRecurso.data; const responseEventos = await ApiService.get('values'); var eventos = responseEventos.data; let viewModel = this.state.viewModel; this.state.viewModel.setResources(recursos); this.state.viewModel.setEvents(eventos); this.setState({ viewModel }); }; render() { const { viewModel } = this.state; return ( <div> <div> <Scheduler schedulerData={viewModel} prevClick={this.prevClick} nextClick={this.nextClick} onSelectDate={this.onSelectDate} onViewChange={this.onViewChange} eventItemClick={this.eventClicked} viewEventClick={this.ops1} viewEventText="Ops 1" viewEvent2Text="Ops 2" viewEvent2Click={this.ops2} updateEventStart={this.updateEventStart} updateEventEnd={this.updateEventEnd} moveEvent={this.moveEvent} newEvent={this.newEvent} /> </div> </div> ) }`
The data load, however when changing between day, month, year, no longer load data.
`constructor(props) { super(props); var arrRe = []