mayank091193 / quasar-draggable-tree

QDraggableTree is a component that displays hierarchical data with drag and drop ability.
https://next-quasar-draggable-tree.netlify.com/
MIT License
72 stars 18 forks source link

sync changes with datasource #2

Open qyloxe opened 4 years ago

qyloxe commented 4 years ago

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 4 years ago

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):

mayank091193 commented 4 years ago

Thank you for writing. I will work on it as soon as I get time.

JTrotta commented 2 years ago

I do not understand how to use events

ricar2ce commented 7 months ago

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.