angular-tree-component icon indicating copy to clipboard operation
angular-tree-component copied to clipboard

Setting Tree Options Allow Drag

Open SmartieCodes opened this issue 10 years ago • 3 comments

I have tried setting this option via a button press but it doesn't take affect. Is this intended?

treeOptions = {
    allowDrag: false
}

enableDragDrop() {
    this.treeOptions.allowDrag = true;
}

SmartieCodes avatar Oct 26 '16 11:10 SmartieCodes

Hey, currently tree options are not binded to.

As a bypass I suggest to update the reference to the options object (should work): this.treeOptions = Object.assign({}, this.treeOptions, { allowDrag: true});

adamkleingit avatar Oct 29 '16 16:10 adamkleingit

Hi, fixed in 2.1.0 - you can now update the options object directly.

adamkleingit avatar Nov 25 '16 10:11 adamkleingit

Great, I'll give it a try 👍

SmartieCodes avatar Nov 25 '16 12:11 SmartieCodes