Coder Social home page Coder Social logo

Comments (10)

komarovalexander avatar komarovalexander commented on May 28, 2024 1

Thanks for reporting this issue!
Fixed in 3.2.2
example: https://stackblitz.com/edit/table-many-rows-ts-nrsdv7?file=Demo.tsx

from ka-table.

yarokon avatar yarokon commented on May 28, 2024 1

Hi, @komarovalexander. This issue is reproducible if the row height is different from another row height. Here is a link with a reproducible example: https://codesandbox.io/s/great-almeida-ojwhc?file=/src/Table.js

ka-table

from ka-table.

yarokon avatar yarokon commented on May 28, 2024 1

I have modified the example to be closer to a real-world example: https://codesandbox.io/s/great-almeida-ojwhc?file=/src/Table.js

How should I measure row height in this case?

It would be more correct if the table did these calculations, like here: react-windowed-select. Ideally, users using this table shouldn't have to think about how to perform this calculation, because the table has all the data to do this. But if it is not supported, the doc must indicate that additional calculation is required for this case.

from ka-table.

komarovalexander avatar komarovalexander commented on May 28, 2024 1

Thanks for the feedback!

I will keep this issue open and will investigate it better coming weeks and let you know if any updates.
Really appreciate your use cases and all feedback you provided!

from ka-table.

yarokon avatar yarokon commented on May 28, 2024 1

Please upgrade to version 2.0.4 or higher. At the moment the latest version is 3.0.0
Screen Shot 2021-02-16 at 18 56 52

from ka-table.

komarovalexander avatar komarovalexander commented on May 28, 2024

reproduced https://stackblitz.com/edit/table-many-rows-ts-rbc6s8?file=Demo.tsx

from ka-table.

yarokon avatar yarokon commented on May 28, 2024

Thanks for the quick fix

from ka-table.

komarovalexander avatar komarovalexander commented on May 28, 2024

Hi @yarokon

By default, ka-table uses equal height for all rows based on height of first row.

But to override this behavior you can use virtualScrolling.itemHeight function to specify each row height
Demo: https://codesandbox.io/s/lucid-herschel-lwmxw?file=/src/Table.js

from ka-table.

komarovalexander avatar komarovalexander commented on May 28, 2024

@yarokon how many dynamic items do you want to render with virtual scrolling >1k, > 10k, 100k, or more?

btw, regarding react-windowed-select are you sure it works well with dynamic items? https://codesandbox.io/s/react-windowed-select-custom-filter-and-component-forked-nf2vt?file=/src/index.js do you know if I miss something in this demo?

from ka-table.

komarovalexander avatar komarovalexander commented on May 28, 2024

Hi @yarokon ,
please update ka-table to 6.7.1 and use code from this demo: https://komarovalexander.github.io/ka-table/#/many-rows-dynamic

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