-
Notifications
You must be signed in to change notification settings - Fork 14
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
For List-based table types, support header/footer outside scrolling region #48
Comments
Hello, was this ever implemented into the library ? |
Nothing that I've done. IIRC it was tricky getting the margin right in the header/footer, so I gave up. There might have been changes to SwiftUI since that have made it possible, but that'll require someone else to pursue and submit a pull request. |
Thank you for the quick response, I'm currently doing a project for college using the library so I was wondering if it was possible, I might try to attempt making the header fixed or calculate the number of rows that can be shown on screen and use pagination instead of scrolling. |
You can try forking the library and modify BaseList (or the selection variants) to place the header and footer builders outside the List block. See how it's done on BaseGrid and BaseStack. A VStack wrapper may be necessary. Then use padding as necessary to get things to align. Not ideal, but may be easier than paging! |
I'll give that a try thank you ! |
...so the header and/or footer can be independent of the scrolling of the rows. Currently they are inside the scrolling region for these table types, because otherwise there are issues with alignment in the layout.
Header/footer should be independently configurable. See the commented code for Stack- and Grid-based tables. Move the config to the
TablerConfig
base class so it can be shared by all the table types.Any conditional views (bounded by if blocks) need to be tested and analyzed to ensure they don't affect scalability.
The text was updated successfully, but these errors were encountered: