Thank you very much. It works very well.
Support Forum
Hi alex.l,
Last week, the same code it works. But now it doesn't work. The only difference is installing node_modules again.
- Attachments
-
- projectModel.zip
- (172.09 KiB) Downloaded 54 times
I see old code in your sources:
changeOrder() {
// create new array with resources
const res = this.resources.map((item) => {
item.name = "11111";
return item;
});
// assign new data to bound variable
this.resources = res;
// same for events
const evts = this.events.map((item) => {
item.name = "event 111";
return item;
});
if (evts.length === 1 || this.value === "b") {
evts.push({
// id: 2,
resourceId: 2,
name: "event BB 1111",
startDate: "2022-03-24T03:00",
endDate: "2022-03-24T05:00",
iconCls: "b-fa",
eventColor: "orange",
});
}
this.events = evts;
},
Check my last response and update it accordingly.
Let us know if you figured out.
All the best,
Alex
I don't follow. Please describe your problem in more words. I am not sure what do you want to achieve by your code and what is correct behaviour of it. Actual result and expected result with steps to reproduce would be perfect.
Check dates you used for added event and visible date range, if you are talking about adding 2nd event and not about renaming initial dataset. If you zoom out, you will see it's added according to dates you set.
All the best,
Alex