Make header optional (like footer) when initializing Grid#233
Make header optional (like footer) when initializing Grid#233wyuenho merged 1 commit intocloudflarearchive:masterfrom
Conversation
|
Under what circumstances would this change be useful? |
|
When I have a bunch of custom cells and my graphics designer says "Can you add another table just like that one with another data set that doesn't have a header?" |
|
How would you know which column is which field then? |
|
I had a similar need, just slightly different. Currently, the Grid assumes the header is in the same table as the Grid. In my case, I needed to place the header in a different table that was in a fixed position, the traditional header lock layout. The default grid render would append the header, so I overrode it not to do that, instead I passed in the something like: |
|
@wyuenho I have a similar scenario to @kriswill - I need a fixed header (which I intent to achieve with a disparate table), and I also have a second set of data in the same format that needs to be grouped separate from the first set of data. EG: Object - The Thing Collection1 - A subset of The Collection Table 1 - Floating header, no data. From that point I intend to listen to sort events on Table 1 and funnel them into Tables 2 and 3 - allowing them to remain sorted per user preference, and still separate |
|
I couldn't find someone who solve this problem, so I made a plugin who works with backgrid to manage fixed header. https://github.com/gsantome/backgrid.fixedheader In my project is working GREAT and it's really easy to implement. |
Additional work required, update pending. Oversights abound!
Edit: Much better - this actually works :3