Comments (2)
Logically speaking, if a node has children then it should be expandable, otherwise, it shouldn't have any children. So, I would rather not have this functionality, but you are free to create your own fork for this change set.
from animated_tree_view.
Ah, let me rephrase it:
I want to forbid the collapsing of node+children as i click on the node.
Currently if i use the treeview and the node has children, the "onItemTap" function will collapse/expand the clicked node while executing the "onItemTap" function.
Probably something like this, while adding the default "node.mayCollapse = true"?
Future<void> toggleExpansion(ITreeNode<Data> item) async {
if (item.isExpanded && item.children.isNotEmpty && item.mayCollapse == false) {
return;
}
else if (item.isExpanded && item.mayCollapse)
await collapseNode(item);
else {
expandNode(item);
await applyExpansionBehavior(item);
}
}
from animated_tree_view.
Related Issues (20)
- 2D Scrolling HOT 1
- How to load the tree data only when it is needed? HOT 4
- How to detect if node is expanding or shrinking in onItemTap method? HOT 1
- expandAllChildren HOT 3
- Get objects in the tree
- Expand on ExpansionIndicator tap instead of on Node tap HOT 3
- node.add() method causes break in linking tree lines: File explorer example HOT 3
- is Infinite nesting expands the fold list? HOT 1
- Please make AnimationController in ExpansionIndicatorState public
- v2.0.1 ,add node to rootNode will produce repeated subNode UI
- How to use with sticky headers?
- [Feature Request] Need indentationBuilder to customize indentation for different level
- UnimplementedError: combinePaths not implemented in HTML renderer [iOs Web]
- Flutter 3.22 breaks package in release mode
- How to change ListTile (child view) left Padding HOT 2
- AnimatedList Performance When Handling Complex Data HOT 9
- [bug] item duplicated HOT 1
- Node Style HOT 1
- onItemTap is sent also when tapping on expansion handle HOT 2
- expandNode performance issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from animated_tree_view.