Git Product home page Git Product logo

Comments (10)

clauderic avatar clauderic commented on May 5, 2024

+1

from react-virtualized.

bvaughn avatar bvaughn commented on May 5, 2024

For anyone following along on this issue, PR #37 is coming along nicely. Would have been finished already if not for the holidays but I hope to have it wrapped up by the end of the weekend.

from react-virtualized.

bvaughn avatar bvaughn commented on May 5, 2024

Resolved via PR #37

from react-virtualized.

oyeanuj avatar oyeanuj commented on May 5, 2024

@bvaughn Just so I understand it clearly, the idea here is that instead of a fixed height, one passes a function that determines the height for that row? And every time, the height of a child row changes, it should update its 'smart' parent container which hosts this rowHeightDeterminant function?

from react-virtualized.

bvaughn avatar bvaughn commented on May 5, 2024

Right. The rowHeight property can now be a number (for fixed heights) or a function that returns a height for a given row-index (for dynamic heights).

If a child row's height changes you may need to call recomputeRowHeights as mentioned in the docs (depending on whether that change is accompanied by other props changes).

You can see some example source code I wrote (used to create the demo page) here:
https://github.com/bvaughn/react-virtualized/blob/master/source/VirtualScroll/VirtualScroll.example.js

from react-virtualized.

ilias-t avatar ilias-t commented on May 5, 2024

@bvaughn Is recomputing row heights a deprecated feature? Given the situation:

<Parent>
  <List
    {...props}
    rowHeight={this.getRowHeight}
    {...parent.state}
  />
</Parent>

is it possible for a change to the parent's state not only re-render the children in the render method—per as mentioned in the section of pure components—but also trigger a recalculation of the rowHeights?

from react-virtualized.

bvaughn avatar bvaughn commented on May 5, 2024

Probably.

There isn't really enough info here for me to answer.

What have you tried? Where's the code? What version of RV are you using? (If it's really old, as your wording suggests, then that's probably an important detail).

Stack Overflow is probably better for this sort of question :)

from react-virtualized.

ilias-t avatar ilias-t commented on May 5, 2024

Just figured I’d ask here given there used to be a recomputeRowHeights method. Now it’s not documented anywhere, nor does there seem to be a documented alternative. Using the latest LTS version.

EDIT: Read latest major version (v9.x.x) rather than Long Term Support version.

from react-virtualized.

bvaughn avatar bvaughn commented on May 5, 2024

Just figured I’d ask here given there used to be a recomputeRowHeights method. Now it’s not documented anywhere, nor does there seem to be a documented alternative.

What documentation are you looking at? recomputeRowHeights is documented here.

Using the latest LTS version.

"LTS" ? I'm not sure what this means.

Anyway, GitHub issues are meant for bug reports and feature-requests. It's hard to scale questions, especially if there's not much information (as is the case here).

from react-virtualized.

ilias-t avatar ilias-t commented on May 5, 2024

Didn’t see those docs, thank you 🙏

from react-virtualized.

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.