sl-vue-tree icon indicating copy to clipboard operation
sl-vue-tree copied to clipboard

Expand/Collapse transition

Open Piersen opened this issue 7 years ago • 3 comments

Question: Would it be possible to add transition wrapper to the expand/collapse v-if, so that collapse/expand could be animated?

Piersen avatar Jul 27 '18 15:07 Piersen

Hey. I have to replace v-if with v-show to allow transitions. Looks like it's easy to hook up, will do a PR for that

holiber avatar Jul 27 '18 18:07 holiber

Thanks a lot. I don't entirely see why v-show is necessary as transitions as described here https://vuejs.org/v2/guide/transitions.html work with v-if too. I just imagined that with a transition wrapper added, the styles of the enter and leave classes could be changed to customize the transition

Piersen avatar Jul 30 '18 07:07 Piersen

v-show appears to be preferred in this scenario (see: the vuejs docs) for performance reasons. I'm debugging significant and problematic performance issues with my sl-vue-tree. I can't (yet) tell if they're related to this library itself, or to vuejs. But according to the docs v-show would be appropriate here.

Having said that, however, I'm still seeing performance issues with v-show, even though it should be much faster (it's just css show/hide).

It's slightly OT for this thread, but the performance issue I'm seeing is >100ms to open a node with 26 children. This becomes problematic when I implement an "open all" icon, and it takes several seconds to open 50 nodes.

lazylester avatar Oct 08 '18 20:10 lazylester