Giter Club home page Giter Club logo

Comments (2)

DiegoAndai avatar DiegoAndai commented on June 7, 2024 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.

marchaos avatar marchaos commented on June 7, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.