GithubHelp home page GithubHelp logo

Pin multiple columns about mantine-datatable HOT 2 OPEN

noxan avatar noxan commented on June 3, 2024
Pin multiple columns

from mantine-datatable.

Comments (2)

icflorescu avatar icflorescu commented on June 3, 2024 1

Just to clarify things for anyone bumping into this: it's not trivial but it can be done.
I'll address it at some point in the future, I just don't have the time/resources to do so now.

You can help speed up the process by:

  • either giving it a try in a PR
  • or, if your company is using Mantine DataTable and can afford it, sponsoring the development of the feature (drop me a message at the email address listed in my GitHub profile before) or hiring my services

from mantine-datatable.

icflorescu avatar icflorescu commented on June 3, 2024

This is indeed a highly desired feature, that has been required and discussed before, see #229 and #477 or #347.
At the moment I don't have enough resources to dedicate to this, but, as I mentioned before, I'm 100% open to a PR:

it would be fantastic if someone would provide some help with scaling this to something like pinLeftColumns: number and pinRightColumns: number.

I think it could be implemented by dynamically computing the size of the pinned columns at render time.
Here are some code starting points:

const { ref: selectionColumnHeaderRef, width: selectionColumnWidth } = useElementOuterSize<HTMLTableCellElement>();

And the CSS to render the scroll shadows as needed, which is a bit convoluted and tricky:

https://github.com/icflorescu/mantine-datatable/blob/f8a40149f4a12b2e023cc81e2572ad493edc3342/package/DataTable.css#L101-L242

from mantine-datatable.

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.