Skip to content

Basic primitives org chart collapse / expand #90

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
amit08255 opened this issue Mar 9, 2022 · 1 comment
Closed

Basic primitives org chart collapse / expand #90

amit08255 opened this issue Mar 9, 2022 · 1 comment

Comments

@amit08255
Copy link

  • How do you handle expansion and collapsing of cards programmatically?

  • The default behavior of basic primitives is to collapse other nodes when you go deep on a node. How to handle this behavior so that cards doesn't collapse automatically?

  • How to collapse all cards in orgchart? and How to collapse all cards in orgchart except root?

@BasicPrimitives
Copy link
Owner

  1. The control is a View of the Items collection on the ViewModel. The Items collection is not supposed to contain the entire database of your nodes. It is the application's responsibility to maintain the required set of nodes in the Items collection. The application should remove or add nodes to the Items collection to collapse or expand nodes.

Look at Dynamic Organizational Chart Nodes Loading demo
https://www.basicprimitives.com/dynamicloading
https://github.com/BasicPrimitives/react-demo/blob/master/client/src/containers/DynamicLoading/DynamicLoading.js
https://github.com/BasicPrimitives/react-demo/blob/master/client/src/redux/modules/demos/dynamicloading.js

  1. The component support rendering of nodes in the form of markers. We explain this feature in the introduction and video:
    https://www.basicprimitives.com/
    https://www.basicprimitives.com/videos

  2. Set cursor item to the root node id to keep the root node in the expanded form. Component expands cursor neighbors as well,

  3. All nodes in the selected items collection stay in the expanded form. Selection checkboxes help add/remove nodes to the selected items collection, so users can browse and pin individual nodes by selecting them to keep them expanded in the diagram.

  4. Set the minimumVisibleLevels property to control the number of expanded levels.

  5. If the component has enough space to display all nodes, it will auto-expand them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants