|
newCard: function () {
const cardIds = this.$refs.kanbanObj.ej2Instances.kanbanData.map((obj) =>
parseInt(obj.Id, 10)
);
const cardCount = Math.max.apply(Math, cardIds) + 1;
const cardDetails = {
Id: cardCount,
Status: "Open",
Priority: "Normal",
Assignee: "Andrew Fuller",
Estimate: 0,
Tags: "",
Summary: "This is summary",
};
// Using openDialog we can open the dialog with new provided data
// this.$refs.kanbanObj.ej2Instances.openDialog('Add', cardDetails);
// Using addCard method we can add the card without opening the dialog
this.$refs.kanbanObj.ej2Instances.addCard(cardDetails);
}, |
Hi,
I'm using react and remote data. when I add the card, the card is read as undefined until the page is reloaded. How would you reload the page without affecting the swim lanes/columns you have collapsed before adding. Could you reload only that specific card or would reloading the server work?
thank you
|
<ejs-kanban id="kanban" ref="kanbanObj" keyField="Status" enablePersistence="true"> </ejs-kanban> |
|
OnActionComplete(args) {
if (args.requestType === "cardCreated") {
var kanbanInstance = this.$refs.kanbanObj.ej2Instances;
setTimeout(function () {
kanbanInstance.refresh();
}, 300);
} } |