sync changes with datasource
Opened this issue · 4 comments
qyloxe commented
currently this code:
updateItem(itemValue) {
const index = this.localValue.findIndex(v => v[this.rowKey] === itemValue[this.rowKey]);
this.$set(this.localValue, index, itemValue);
this.$emit("input", this.localValue);
}
emits the whole tree struct from this.localValue. It would be helpful to also emit only changes after dropping the node. This event should have source node, target node, source position, target position etc.
With such event it would be possible to efficently synchronize state in big (1000+ nodes) trees.
the-nicolas commented
I was also searching for the normal drag/moved event...
My goal was to create some minimal CRUD showcase (btw: that should be the example):
- add node
- edit node
- delete node
- sync changes and group/node moves with backend
mayank091193 commented
Thank you for writing. I will work on it as soon as I get time.
JTrotta commented
I do not understand how to use events
ricar2ce commented
Is this project still alive? Because if so, they should prioritize this issue, since this component is not very useful if we cannot update the backend.