hansihe / data_table

Simple and flexible DataTable component for LiveView
https://hexdocs.pm/data_table/
Apache License 2.0
53 stars 3 forks source link

Fix a bug where a group_by in the base query resulted in crashes in t… #1

Closed JerzyDziala closed 1 year ago

JerzyDziala commented 1 year ago

I encountered a problem where when using a group_by clause in the source query, the thing would crash. The reason for that turned out to be the way in which a count query was constructed from the original query. It was returning a number of rows in each group and not the number of groups.

The fix is simply to tweak the construction of the count query a bit.

hansihe commented 1 year ago

Thanks!