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

IMPORTANT! Tree does not work inside a MODAL ! STUCK !

Open destromas1 opened this issue 9 years ago • 8 comments

I Am using https://github.com/dwmkerr/angular-modal-service

Inside MODAL , I wanna use https://github.com/wix/angular-tree-control . But this does not work inside the MODAL , but works fine if I do not use MODAL , just in Home Page

Please let me know what you think about the scenario.

destromas1 avatar Apr 30 '16 20:04 destromas1

I have no idea what;s going on. I guess they are doing something strange in this library. I'd try to debug how the tree is constructed in the modal popup - that is, during the execution of the modal template compile at https://github.com/dwmkerr/angular-modal-service/blob/master/src/angular-modal-service.js#L118-L120, what options are passed into the tree control at https://github.com/wix/angular-tree-control/blob/master/angular-tree-control.js#L104

is that the options object you expect?

yoavaa avatar May 01 '16 07:05 yoavaa

@yoavaa

One more update , I tried https://github.com/angular-ui-tree/angular-ui-tree with keeping all other same . angular-ui-tree works fine inside the Modal . But wix/angular-tree-control does not work.

destromas1 avatar May 01 '16 08:05 destromas1

@yoavaa Your Tree control works fine if any options object we pass,right ? Coz inside the Library's code I saw if options props are not available it takes the defaults . But in the treeTransclude directive here https://github.com/wix/angular-tree-control/blob/master/angular-tree-control.js#L392 , scope.options is undefined . this is the issue .

destromas1 avatar May 01 '16 08:05 destromas1

But the trreeTransclude gets it's scope from the tree control - and should inherit the options (via prototype inheritance). Can you check what is the prototype hierarchy for this scope?

On Sun, May 1, 2016 at 11:18 AM Shahjada Talukdar [email protected] wrote:

@yoavaa https://github.com/yoavaa Your Tree control works fine if any options object we pass,right ? Coz inside the Library's code I saw if options props are not available it takes the defaults . But in the treeTransclude directive here https://github.com/wix/angular-tree-control/blob/master/angular-tree-control.js#L392 , scope.options is undefined . this is the issue .

— You are receiving this because you were mentioned.

Reply to this email directly or view it on GitHub https://github.com/wix/angular-tree-control/issues/214#issuecomment-216024985

yoavaa avatar May 01 '16 10:05 yoavaa

@yoavaa

I fixed https://github.com/wix/angular-tree-control/pull/215

You can check and merge the PR

destromas1 avatar May 01 '16 16:05 destromas1

I cloned the repository and it works for me (yeahhh!). But "bower install angular-tree-control" does not contain this fix and it's sad.

Mad-Head avatar Jun 21 '16 16:06 Mad-Head

@Mad-Head I fixed in the Repo , not sure about the Bower!

Feels good , this helped you :+1:

destromas1 avatar Jun 21 '16 16:06 destromas1

"templateOptions" also does not work with modals.

Mad-Head avatar Jun 22 '16 10:06 Mad-Head