mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-02-20 21:04:17 +08:00
Update file infos then running_files changed (#772)
This commit is contained in:
parent
feb0ac214e
commit
c9b21f221d
1 changed files with 3 additions and 1 deletions
|
@ -48,10 +48,12 @@ defmodule LivebookWeb.FileSelectComponent do
|
|||
def update(assigns, socket) do
|
||||
{force_reload?, assigns} = Map.pop(assigns, :force_reload, false)
|
||||
|
||||
running_files_changed? = assigns.running_files != (socket.assigns[:running_files] || [])
|
||||
|
||||
socket =
|
||||
socket
|
||||
|> assign(assigns)
|
||||
|> update_file_infos(force_reload?)
|
||||
|> update_file_infos(force_reload? or running_files_changed?)
|
||||
|
||||
{:ok, socket}
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue