mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-10-10 05:25:57 +08:00
Flush frame outputs from state (#1798)
This commit is contained in:
parent
fc370470b2
commit
c1a2c924c6
1 changed files with 3 additions and 2 deletions
|
@ -3,7 +3,8 @@ defmodule LivebookWeb.Output.FrameComponent do
|
|||
|
||||
@impl true
|
||||
def mount(socket) do
|
||||
{:ok, assign(socket, counter: 0, output_count: 0, persistent_id_map: %{})}
|
||||
{:ok, assign(socket, counter: 0, output_count: 0, persistent_id_map: %{}),
|
||||
temporary_assigns: [outputs: []]}
|
||||
end
|
||||
|
||||
@impl true
|
||||
|
@ -56,7 +57,7 @@ defmodule LivebookWeb.Output.FrameComponent do
|
|||
|
||||
:append ->
|
||||
socket
|
||||
|> update(:outputs, &(outputs ++ &1))
|
||||
|> assign(:outputs, outputs)
|
||||
|> update(:output_count, &(length(outputs) + &1))
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue