Code Monkey home page Code Monkey logo

Comments (6)

nihgwu avatar nihgwu commented on May 18, 2024 3

@genomics-geek fixed in v1.7.2

from react-base-table.

nihgwu avatar nihgwu commented on May 18, 2024 1

@genomics-geek I'd say that would be problematic if you use local state in cell renderer, as the component will be unmount when it's out of viewport by scrolling, and all the local state will be lost, from your snippet, I think you can use onRowsRendered to perform lazy data loading, and that's what we did internally, by that way you can load and cache on demand

from react-base-table.

nihgwu avatar nihgwu commented on May 18, 2024

Hey, thanks for the report, I think it's caused by renderElement https://github.com/Autodesk/react-base-table/blob/master/src/utils.js#L3-L15, we call the function component as a function directly to avoid extra wrapper for the cell component in the component tree in react dev tools, so hooks is not supported right now, but definitely it should be fixed, and because of that, React.memo is not supported either, we should support that too

from react-base-table.

genomics-geek avatar genomics-geek commented on May 18, 2024

@nihgwu that would be great, thanks!

from react-base-table.

genomics-geek avatar genomics-geek commented on May 18, 2024

awesome - that was quick! Thanks @nihgwu

from react-base-table.

genomics-geek avatar genomics-geek commented on May 18, 2024

@nihgwu - thanks for the heads up. Don't plan on using local state in the cellRenderer.

from react-base-table.

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.