mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-04 12:04:20 +08:00
Allow smart cells to reevaluate automatically
This commit is contained in:
parent
b2bcc064fa
commit
cb0546f901
3 changed files with 5 additions and 1 deletions
|
@ -15,6 +15,7 @@ defmodule Livebook.Notebook.Cell.Smart do
|
|||
:source,
|
||||
:chunks,
|
||||
:outputs,
|
||||
:reevaluate_automatically,
|
||||
:kind,
|
||||
:attrs,
|
||||
:js_view,
|
||||
|
@ -29,6 +30,7 @@ defmodule Livebook.Notebook.Cell.Smart do
|
|||
source: String.t() | :__pruned__,
|
||||
chunks: Livebook.Runtime.chunks() | nil,
|
||||
outputs: list(Cell.indexed_output()),
|
||||
reevaluate_automatically: boolean(),
|
||||
kind: String.t() | nil,
|
||||
attrs: attrs() | :__pruned__,
|
||||
js_view: Livebook.Runtime.js_view() | nil,
|
||||
|
@ -47,6 +49,7 @@ defmodule Livebook.Notebook.Cell.Smart do
|
|||
source: "",
|
||||
chunks: nil,
|
||||
outputs: [],
|
||||
reevaluate_automatically: false,
|
||||
kind: nil,
|
||||
attrs: %{},
|
||||
js_view: nil,
|
||||
|
|
|
@ -1978,6 +1978,7 @@ defmodule LivebookWeb.SessionLive do
|
|||
type: :smart,
|
||||
empty: cell.source == "",
|
||||
eval: eval_info_to_view(cell, info.eval, data, changed_input_ids),
|
||||
reevaluate_automatically: cell.reevaluate_automatically,
|
||||
status: info.status,
|
||||
js_view: cell.js_view,
|
||||
editor:
|
||||
|
|
|
@ -249,7 +249,7 @@ defmodule LivebookWeb.SessionLive.CellComponent do
|
|||
cell_id={@cell_view.id}
|
||||
validity={@cell_view.eval.validity}
|
||||
status={@cell_view.eval.status}
|
||||
reevaluate_automatically={false}
|
||||
reevaluate_automatically={@cell_view.reevaluate_automatically}
|
||||
reevaluates_automatically={@cell_view.eval.reevaluates_automatically}
|
||||
/>
|
||||
</:primary>
|
||||
|
|
Loading…
Add table
Reference in a new issue