Benjamin-Philip
I’ve got a GenServer with some tabular data that updates frequently. I would like to be able to render this live data. Presently, the way to go seems to create a smart cell for this, and write some custom JS to render my table. However, Kino.DataTable fits all my needs, and I just need a way of updating it. So, I would like to do this without replicating what’s already there in Kino.DataTable.
How do I render live data with a Kino.DataTable?
Trending in Questions
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
Hi everyone,
I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding.
I sta...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ai
- #ecto-query
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #metaprogramming
- #hex










Showing Posts 1 to 7- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
jonatanklosko
You can use
Kino.Frameand render newKino.DataTableinto the frame as needed.Benjamin-Philip
@jonatanklosko, I had tried this out earlier by modifying the
Kino.Framedocs for aDataTablelike this:This didn’t render, and I thought that
Kino.Framewas not the way to go. However, when I saw your reply, I increased the sleep time to 100 miliseconds and I got a very jittery rendering. Things stabilized once I increased the sleep time to a second. I guess what was happening was that theDataTabletook more that 50ms to render, so re-rendering it at that speed led to nothing being rendered at all (except at the last re-render).Perhaps a note in the Kino.Frame docs regarding this would be a good idea?
Even re-rendering every second is slightly jittery because the entire
DataTablehas to be re-rendered. The render cell momentarily disappears while theDataTableis rendering. I am guessing this is because we are also re-rendering the Table interface, reloading the associated js and css etc. One way to optimize this is to reload only the data, and not the table viewer itself. After that, I could apply diffs instead. This is out ofKino.DataTable’s scope, so writing my own JS doesn’t seem to much to ask.jonatanklosko
Oh, I assumed you don’t need to re-render so often. The slow re-render is less about
Kino.Frameand more aboutKino.DataTable, which is rendered inside an iframe (as are allKino.JS), so it does need to load and run the JS again. If you want the table to quickly react to updates, then it should be a singleKino.JS.Livereacting to events.We have a lower-level abstraction called
Kino.Table, where you have more control over how you query the data, and you can enable a “Refetch” button to re-run the query. However, that’s still not reactive.The current design of
Kino.DataTableis very much static. To make it reactive we could addKino.Table.update, which would invoke a new callback@callback update(update_arg)to update the state and then re-fetch and broadcast the current page. And then we could addKino.DataTable.update(tabular)and implement the callback, which would be similar to the currentKino.Table.newand@callback init(init_arg).cc @josevalim
Benjamin-Philip
That’s what I thought.
That sounds great. Like you and I said, this is out of
DataTable’s scope, but Elixir being a language that puts a lot of emphasis on being able to handle live data, I think a way to deal with live updates would be appreciated.Maybe if
Table.updateworks out, we could add aTable.listen.josevalim
Yes, allowing the data table to be updated would be great.
jonatanklosko
To be clear, I meant that it’s static now, but we could support the update : )
I opened an issue, so that we don’t forget.
Benjamin-Philip
That’s fine too! I didn’t notice your last sentence in that quote.