mickel8
Phoenix LiveDashboard - create a live table from data stored in assigns
Hi,
I am trying to extend LiveDashboard with my own page and I would like to create a table that will be based on the data that I have in my assigns.
Is it possible to achieve this using the live_table component?
The problem is that live_table uses row_fetcher to determine rows for the table, and row_fetcher doesn’t take assigns as an argument. I could try to pass them as a state but I feel like that’s not the best idea?
Also, this page is going to be distributed as a separate elixir package so I don’t have an access to the Phoenix core components like table.
I assume that the only way is to write my own component?
First Post!
LostKobrakai
You could maybe be sneaky and use the process dictionary to share the data between the LV state and the function being called. Given a function is involved LV cannot change track the data for the table changing anyways. Though can’t you use the function to fetch the data in the first place?
Last Post!
mickel8
Popular in Questions
Other popular topics
Latest Phoenix Threads
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
- #hex
- #security









