# I've made a simple library for viewing the contents of lists

**URL:** https://discourse.elm-lang.org/t/ive-made-a-simple-library-for-viewing-the-contents-of-lists/4899
**Category:** Show and Tell
**Created:** [January 1, 2020, 6:42pm UTC](https://discourse.elm-lang.org/t/ive-made-a-simple-library-for-viewing-the-contents-of-lists/4899 "2020-01-01T18:42:55Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![rjbma](https://avatars.discourse-cdn.com/v4/letter/r/dfb087/32.png) [@rjbma](https://discourse.elm-lang.org/u/rjbma)
#### Post date: [January 1, 2020, 6:42pm UTC](https://discourse.elm-lang.org/t/ive-made-a-simple-library-for-viewing-the-contents-of-lists/4899/1 "2020-01-01T18:42:55Z")

</div>

Hi there!

I’ve made a package ([elm-listview](https://github.com/rjbma/elm-listview)) for viewing the contents of a `List`, currently supporting sorting and pagination. Hope to add some more features in the future (grouping, filtering and trees come to mind).

Basically, it’s somewhat similar to [elm-sortable-table](https://github.com/evancz/elm-sortable-table) but I wanted to make it so the package itself did not render the table or produce any messages (so, no `view`, `update` or `Msg` in the core library). I just wanted it to transform the data (i.e., sort, paginate, etc.), and let the user decide how that should be rendered.  
That being said, the package does include some standard viewers for rendering an HTML table, for example.

A problem I see with this approach, however, is that I had to expose _a lot_ of details that would otherwise be internal to the package. I worry this may become a bigger problem going forward, as more features are added.

I would definitely welcome any advice or “war stories” anyone has on this subject!

Thanks

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex035/uploads/elm_lang/original/1X/50a05e53677a2c3b47776d7abd0f113eb50193a1.png) [@system](https://discourse.elm-lang.org/u/system)
#### Post date: [January 11, 2020, 6:43pm UTC](https://discourse.elm-lang.org/t/ive-made-a-simple-library-for-viewing-the-contents-of-lists/4899/2 "2020-01-11T18:43:00Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
