lebbe / pocota Goto Github PK
View Code? Open in Web Editor NEWPolymorphic Compositional Tables: Responsiveness in React while making tables with markup, not data-structures
License: MIT License
Polymorphic Compositional Tables: Responsiveness in React while making tables with markup, not data-structures
License: MIT License
Before/when fixing the found bugs, proper testing must be facilitated. React Testing Library looks like a good fit.
I'm pretty sure this will fall apart when people start using colspan (and rowspan) in this table...
Ultimately this should be of type ReactNode, and handed as an option to the table.
Make an example where you can sort the table by clicking sorting buttons in the headers.
Right now it isn't possible to dynamically change the rotate
property, the table doesn't update.
Seems to be an issue where useLayoutEffet(fn, []) runs several times after all, especially when toggling rotate. So we end up with the error "You can only promote one column to the front.".
Would be worth trying to define a RowContext for each and every row, and place information about promoted columns in this context. I think we can avoid using useLayoutEffect or useEffect at all. Updating the context from the cell is good enough.
Maintaining front promoted columns will be straight forward, because there can only exist one. So if there already is one in the context, just override it. Perhaps who is being promoted is dynamically altered.
A worse scenario is, perhaps, maintaining the back promoted rows, since there can be more of them.
Some times the header might be unnecessary in rotated view. Especially when the row cells contains self-explanatory elements, like buttons or links.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.