mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-06 04:54:29 +08:00
Don't report form control change on first render (#2852)
This commit is contained in:
parent
a8c08715e2
commit
dd29be252b
1 changed files with 2 additions and 2 deletions
|
@ -3,7 +3,7 @@ defmodule LivebookWeb.Output.ControlFormComponent do
|
|||
|
||||
@impl true
|
||||
def mount(socket) do
|
||||
{:ok, assign(socket, data: %{})}
|
||||
{:ok, assign(socket, data: nil)}
|
||||
end
|
||||
|
||||
@impl true
|
||||
|
@ -17,7 +17,7 @@ defmodule LivebookWeb.Output.ControlFormComponent do
|
|||
{field, assigns.input_views[input.id].value}
|
||||
end)
|
||||
|
||||
if data != prev_data do
|
||||
if prev_data != nil and data != prev_data do
|
||||
change_data =
|
||||
for {field, value} <- data,
|
||||
assigns.control.attrs.report_changes[field],
|
||||
|
|
Loading…
Add table
Reference in a new issue