An example of table pagination, sorting, and filtering using LiveView#20
An example of table pagination, sorting, and filtering using LiveView#20joerichsen wants to merge 9 commits into
Conversation
joerichsen
commented
Mar 22, 2019

I had a page with 12 items. When the page size was set to 10, it would only show one page due to the number of rows being divided by the page size then truncating. Adding one 1 the number of rows / page size before truncating should fix the issue.
Handle page overflow
|
Thanks for this! Sorry it has taken me so long t get back, but I have been waiting until we had pushstate support in place for proper url updates so we can be good web citizens with LV. Now that live_link and live_redirect has landed, this PR can make use of it to update the URL bar and refetch the info for pagination and sorting. See my commit here for examples of how it works: If you can update it to use the latest features, I will gladly merge. Thanks! |
|
Excellent :-) I will update this PR soon. |
…ew_example into table_example
|
OK, I have tried to update the example with pushstate support now :-) I works but I am not sure that I handled it the right way so feedback is very welcome :-) Look at the changes here https://github.com/joerichsen/phoenix_live_view_example/compare/95789dd52c4a15bb0dd2fbee8a97fc2a3781d4b6..65806f02514f36361f9d482de6dd0b6e6bbbcccc |