New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
useAbsoluteLayout: Enable react-table to build with divs #1522
Conversation
Very cool! Let's get a few other things going so we can follow along better:
|
It's also worth noting that a |
sync master
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 6bcd42b:
|
@tannerlinsley , good to merge form my side, have a look when you get a chance. |
This is looking really really good. One thing that I think we could expect from a plugin like this is that rows would also be absolutely positioned. What do you think? I know that would required that Thoughts? |
My thoughts are - absolute positioned rows will be useful in case of virtual scrolling only, which if anybody wants(which most of them will) can use any virtualization library(like react-window etc) for it and provide the inputs needed by it(whether the grid is of variable row heights), putting that functionality in this hook will be a redundant one in my opinion. |
Yeah, that's a good point. Okay, I think I'm ready to merge this. |
IMO this seems like an unnecessary plugin to pull into this library. I thought one of the benefits to this plugin system, was you could write your own plugin hook without having to get it into this lib. Seems like it could be published as a 3rd party plugin and could be listed as an option somewhere on the README? Also, @tannerlinsley, this seems to be referring to a plugin that doesn't exist? |
The way I see it, this hook is similar in spirit to the much needed
This hook doesn't alter the core in any way, is entirely tree-shakeable and should be extremely simple to maintain with the rest of the library. If it presents problems in the future, we can always move it out to its own import or repo, but I don't want to make that decision before it's needed. |
|
I'd actually like to revisit this idea and possibly make a few changes:
This is in light of other layout hooks that could be built using the same technique as this one. Mainly, I'm thinking about the |
Inspired by
useFlexLayout
.Enable react-table to build with divs
Help in integrating virtual scrolling
Disclaimer: May require some fixes(to integrate well with column order/pinning)