Code Monkey home page Code Monkey logo

Comments (9)

mknabe avatar mknabe commented on May 16, 2024 1

@mi-lee I mean that if you have a custom render for a column like below. MyComponent will mount/unmount on every state change instead of just re-rendering. It can be a pretty big performance hit depending on what MyComponent is doing.

We are using redux-form and the performance hit was substantial so we had to switch to a different data table library :(

render: (props) => {
  return (
    <span className='number'>
      {props.value}
      <MyComponent />
    </span>
  );
}

from table.

tannerlinsley avatar tannerlinsley commented on May 16, 2024

from table.

mknabe avatar mknabe commented on May 16, 2024

Will do

from table.

mknabe avatar mknabe commented on May 16, 2024

I started implementing my first use case and it was easy enough... but it looks like if you do a custom column render, it will mount/unmount that component on every update which can cause a major slowdown. I'm not sure how to fix this but I plan on looking into it.

2017-01-30 14 08 19 screenshot

Edit: this isn't as much of a problem in production mode (with 25 rows)

from table.

mi-lee avatar mi-lee commented on May 16, 2024

@mknabe, do you mean that it re-rendered the entire table (rather than the cell or row)? I'm also looking for a table with good editing capabilities. Did you end up making a PR?

from table.

tannerlinsley avatar tannerlinsley commented on May 16, 2024

@mknabe, this may have been due to some lack of internal key-ing. Have you tried the latest version? This is definitely not the type of functionality I want to keep around, so any help in making it work would be fantastic.

from table.

mknabe avatar mknabe commented on May 16, 2024

@tannerlinsley looks fixed! 🥇

from table.

tannerlinsley avatar tannerlinsley commented on May 16, 2024

Awesome! Glad to hear :) You can also use standard (non-react) functions as custom renderers so long as they return a primitive that react can render (string, number, boolean, etc) :) Cheers!

from table.

mi-lee avatar mi-lee commented on May 16, 2024

cool, thanks for getting back to me @mknabe!

from 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.