8
Views
2
Comments
Solved
[zTree] Event button Expand or Collapse zTree
Question
Forge component by Eduardo Luís
20
Published on 03 Oct 2019

Good afternoon,


I have a part as resolved: https://www.outsystems.com/forums/discussion/66552/save-the-collapse-and-expand-it-in-a-session-variable/

Is there a way to catch the "+" and "-" button event? In the way that it implements, the user will always have to click on the name (node), for my changes to be saved. This is not a legal way for the user. Since he is used to clicking + and - to expand or collapse.

When you click the "+" in the specific node tree, that node will be expanded. When performing or updating (F5) on the page, that node will keep expanded .. until the user selects the "-".



Do you have any idea?

Rank: #69
Solution

Hi Danilo,

In your implementation you are using the onClick event to get the current node, I think that just switching to the onExpand event.


Let me know if that solves it.

Rank: #129
Solution

Yes,

agree with what Huarlem is saying, you're just focusing on the wrong event, there's onExpand and onCollapse available.

I had a little try, see attached demo

Dorine

twDemoZTree.oml

Rank: #69
Solution

Hi Danilo,

In your implementation you are using the onClick event to get the current node, I think that just switching to the onExpand event.


Let me know if that solves it.

Rank: #129
Solution

Yes,

agree with what Huarlem is saying, you're just focusing on the wrong event, there's onExpand and onCollapse available.

I had a little try, see attached demo

Dorine

twDemoZTree.oml