dbsimmons64
Flop - displayed inserted record in correct place
Hi All
I’m using the amazing flop/flop_phoenix libraries for pagination. I’m using liveview streams to retrieve a list of customer transactions ordered by a date field. The pagination works really well but when I create a record it gets inserted at the bottom of the current paginated list i.e. it doesn’t take account of the date entered. If I reresh the page all works well and my new record appears in the correct place.
Does anyone know if it is possible to retrieve the newly created record but in the correct place in the paginated order.
As an example. If I create a record with a date that would normally appear on Page 5 of my paginated list but I’m looking at Page 2 when I create the record I’d really like the display to update/jump to Page 5.
cheers
Dave
Most Liked
dbsimmons64
Thank you so much @|sodapopcan. I’ve been thinking about this for a few days now and coming to the same conclusion as yourself (reset the stream and relaod the records).
cheers
Dave
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









