What if we want to set a button to enable to show and hide the content?
just to show and hide all the fields but still show the “Record” part in the example.
Add a “PanelExpanderButton”. http://gojs.net/latest/intro/buttons.html
For example, look at the UML Class Node sample: http://gojs.net/latest/samples/umlClass.html. That node template actually has two "PanelExpanderButton"s, one for the properties section and one for the methods section.
Awesome! I’ll try~
hey, Walter, i think what i need is with only one button on the top and to close all the lists… not separate buttons.
The UML Class sample demonstrates how to have a button that would show and hide some content within the same node.
You’ll need to add it to your own node template in the manner that you desire.
When you want more examples, just search the source code. For example:
This leads to the following additional samples:
Those are in addition to the UML Class sample.
For customization of the button, see how that button is defined at:
or in the extensions subdirectory on GitHub: