Comments (2)
Hi! sorry for the very late follow up, but I still haven't found a way to do what OP was trying to do. The parent node (the one with className "rv-sticky-parent-node"
rendered by renderChildWithChildren
) is always the same div, with no way to customize it. And the same for list nodes. What I'm trying to find out how to do is that for nodes with children instead of
// current supported behaviour
// the parent node and node list divs are provided by the library
// ParentComponent, ChildrenComponentA, and ChildrenComponentB are returned by the rowRenderer function
<div className="rv-sticky-parent-node">
<ParentComponent />
<div className="rv-sticky-node-list">
<ChildrenComponentA />
<ChildrenComponentB />
</div>
</div>
I had the option of either using or adding a custom parent node:
// use a custom parent node
<MyCustomParentNode className="rv-sticky-parent-node">
<ParentComponent />
<div className="rv-sticky-node-list">
<ChildrenComponentA />
<ChildrenComponentB />
</div>
</MyCustomParentNode>
// add a custom parent node
<div className="rv-sticky-parent-node">
<MyCustomParentNode>
<ParentComponent />
<div className="rv-sticky-node-list">
<ChildrenComponentA />
<ChildrenComponentB />
</div>
</MyCustomParentNode>
</div>
And the same for the node list
// use a custom the node list
<div className="rv-sticky-parent-node">
<ParentComponent />
<MyCustomNodeList className="rv-sticky-node-list">
<ChildrenComponentA />
<ChildrenComponentB />
</MyCustomNodeList>
</div>
// add a custom node list
<div className="rv-sticky-parent-node">
<ParentComponent />
<div className="rv-sticky-node-list">
<MyCustomNodeList>
<ChildrenComponentA />
<ChildrenComponentB />
</MyCustomNodeList>
</div>
</div>
And I think this is not supported right now, please correct me if I'm wrong. I will be working on a PR proposal to support this in the meantime as I really need it. Thanks in advance and thanks for creating the library in the first place! 😊
from react-virtualized-sticky-tree.
in the renderer that you pass in, you get all the info needed to switch on the node type and return whatever each node type needs.
from react-virtualized-sticky-tree.
Related Issues (20)
- Always getting SCROLL_REASON.OBSERVED even after setting through setScrollTop HOT 7
- Question: Would this lib support unknown cell height? HOT 1
- Update component lifecycle methods HOT 3
- Issue while using scrollNodeIntoView for implementing jump to functionality HOT 13
- The last node from list does not render in DOM HOT 5
- Code for react-virtualized-sticky-tree demo HOT 2
- Any plans of moving to hooks? HOT 5
- DOM not utilising entire window Height: Video HOT 3
- Cannot read property 'top' of undefined HOT 2
- Quick scroll missing render HOT 1
- List Missing HOT 1
- prop scrollTop is not working? onScroll event cause a bug. Gif proof HOT 4
- ForceUpdate HOT 1
- transformY rather than top HOT 1
- Flex-direction column-reverse
- Cannot read properties of undefined (reading 'id') HOT 4
- More examples, including using `meta`
- Strict Mode Warning HOT 1
- Sample code doesn't seem to work HOT 2
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 react-virtualized-sticky-tree.