Code Monkey home page Code Monkey logo

Comments (5)

KevinVandy avatar KevinVandy commented on June 5, 2024

This seems like your implementation problem. What would you expect TanStack Table to do differently?

from table.

thomassimko avatar thomassimko commented on June 5, 2024

This is the exact same example as from the https://tanstack.com/table/latest/docs/framework/react/examples/column-pinning-sticky but with the fixed width style removed. If the TanStack recommendation is to use column.getStart('left') to determine the position of the sticky column, I would expect it to react to a fluid table width. column.getStart('left') doesn't actually report the start of the column which is confusing.

from table.

KevinVandy avatar KevinVandy commented on June 5, 2024

@thomassimko Adding a minWidth along with width fixes it
image

Otherwise, you'll just have to change the width's and start values to use percentages or something if you actually want to allow the columns to squeeze

from table.

thomassimko avatar thomassimko commented on June 5, 2024

So based off your response, this library does not support pinned columns in a fluid table without specifying the width of the column as px percentages. Currently I am using a ResizeObserver that is calculating each column's bounding rect in order to calculate the true position of the pinned column, rather than using the library's getStart methods. I was hoping that there would be a cleaner way to achieve this.

from table.

KevinVandy avatar KevinVandy commented on June 5, 2024

@thomassimko I guess I don't get what you would expect. TanStack Table doesn't really have a way of knowing if you change the total width of the table or not. It you are using it's size system, it expects the elements to be styled to be that exact size. If you are allowing columns to be squished together, how would the table instance know, and how would it measure?

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.