Documentation?
Perhaps I'm missing something - is there any formal documentation, other than the common demo and the README?
I'd like to see more information on various aspects of this library, including:
- Specifically, how to make scrolling work and what the expected way to implement a scrollable table is
- How to make sorting work - the link in the most relevant issue refers to a commit that's no longer accurate to the current implementation
- Some kind of changelog for each version which isn't just a list of commits
- Info and simple examples for likely common needs, such as alternating row background colours (which I can see are definitely quite doable)
- Better KDoc comments, the existing ones are quite unhelpful and many are missing
I'd consider contributing to this documentation myself, but I'm a relative newcomer to Compose and I can't figure out the first two points myself. However, certainly, I could contribute more than nothing! Any plans for this?
Sorry about that.
Scrolling: it works very similar to Column, except there's not really anything that needs to be done in most cases. See the demo for usage: https://github.com/sproctor/compose-data-table/blob/be0a85772d1bd7513c946bdf36ebce55beab7459/demo-common/src/commonMain/kotlin/com/seanproctor/datatable/demo/App.kt#L73
If the table overflows its bounds, it becomes scrollable. You can host the scroll state to implement scrollbars on desktop.
Sorting: It's in the demo, but the demo had a bug. I just pushed a fix for that. https://github.com/sproctor/compose-data-table/blob/be0a85772d1bd7513c946bdf36ebce55beab7459/demo-common/src/commonMain/kotlin/com/seanproctor/datatable/demo/App.kt#L40
Changelog: I use this library in a production app. I'm one person. If you want to write a decent changelog for each version, I'd be happy to use them.
Row backgrounds: done
KDoc: Yeah, I should add these. If you want to do a PR even just with something basic, that might be useful to someone.
Thanks for the clarifications!
Yeah, documentation and change tracking are a bit arduous, I understand. I'll see about digging in and PRing some KDocs when I have some time!