Skip to content
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

Table sorting and pagination w/o reflex-dom #16

Open
bitemyapp opened this issue Aug 5, 2018 · 2 comments
Open

Table sorting and pagination w/o reflex-dom #16

bitemyapp opened this issue Aug 5, 2018 · 2 comments

Comments

@bitemyapp
Copy link

bitemyapp commented Aug 5, 2018

Have you seen this land anywhere? Couldn't find it poking around the codebase save a mention of pagination in the reflex-dom stuff I think. Trying to avoid pulling in JS if I can help it. If not, I'll layer it over my colonnade table manually.

@andrewthad
Copy link
Member

I haven't attempted to do anything like this outside of reflex-dom-colonnade. The difficulty is that if you aren't doing these with javascript, any attempt to do pagination and sorting will involve some notion of a route (and likely a database as well). Maybe something could be done in yesod-colonnade since yesod has type-safe routing and a blessed approach to working with databases, but I'm not sure how exactly that would look. Maybe a subsite, maybe a typeclass.

@bitemyapp
Copy link
Author

http://hackage.haskell.org/package/yesod-paginator-1.1.0.0/docs/Yesod-Paginator.html#v:selectPaginated

Could probably turn it inside out into a HOF if you cared enough to abstract over the database. (I don't)

I might turn everything into GET query params and maybe use the widgets separately for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants