Giter VIP home page Giter VIP logo

Comments (7)

KamranAsif avatar KamranAsif commented on July 23, 2024

Can you please create a jsfiddle for this? You can fork off https://jsfiddle.net/uq8osbp1/

from fixed-data-table-2.

wcjordan avatar wcjordan commented on July 23, 2024

@msojka I've seen a similar issue with images which happened because the table recycles rows and updates the props on them for performance. With images updating of the props would keep the old image and just update the src attribute on it, leading to the wrong images appearing until you stopped scrolling.

I was able to work around the issue by setting a key prop on the image element (at the cost of not getting to recycle our image elements).

A fiddle as Kam mentioned, or details on how your focused components are specified would be great. Thanks!

from fixed-data-table-2.

msojka avatar msojka commented on July 23, 2024

@KamranAsif here is minimum jsfiddle to replicate the issue: https://jsfiddle.net/msojka/f6aqLe0y/1/

Click to focus a1 input and scroll down to see multiple inputs created and focused as well (where exactly depends on height).

from fixed-data-table-2.

KamranAsif avatar KamranAsif commented on July 23, 2024

@msojka As @wcjordan mentioned, you can use the key property to fix this:

<input 
  key={this.props.rowIndex} 
  type="text" 
  value={this.props.data[this.props.rowIndex][this.props.columnKey]} 
/>

https://jsfiddle.net/9jzy061k/3/

from fixed-data-table-2.

msojka avatar msojka commented on July 23, 2024

@KamranAsif ok that helped. Also note that I found it's important to add key to MyCell as well to ensure proper passing of props to the cells and children.

Anyways with this sorted out everything works great with one caveat. Scrolling (just scrolling) is terribly slow in IE 11. Even when stripped down to just a few data and simple cell content (divs instead of inputs).Chrome and FF are smooooth. Seems like IE render engine is just horrible. Anybody else experiencing same thing?

from fixed-data-table-2.

KamranAsif avatar KamranAsif commented on July 23, 2024

@msojka Hmm we haven't run into any issues like that yet. Does scrolling on this webpage also appear slow to you? http://schrodinger.github.io/fixed-data-table-2/example-reorder.html

from fixed-data-table-2.

burakcan avatar burakcan commented on July 23, 2024

The whole point of the fixed-data-table is to work with "fixed data". It's optimisations comes from windowing and recycling. In the case of inputs, recycling is not possible and it will cause lots of performance loss. I think there's nothing to do here other than using keys and disabling recycling for that elements.

from fixed-data-table-2.

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.