Skip to content

Show loading in FileSelectComponent only when listing files #3111

@jonatanklosko

Description

@jonatanklosko

As the user types we reuse the directory listing, we only do an actual loading when the directory changes (or the component receives an update to force reload):

with {:ok, files} <- FileSystem.File.list(dir) do

Also, ideally we would colocate setting loading: true with the actual listing, rather than setting it "upfront":

{:noreply, assign(socket, loading: socket.assigns.file.path != path)}

In order for the UI to update, likely the best way would be to do the listing async in a task.

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreTechnical changes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions