Skip to content

Commit

Permalink
Fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismccord committed Aug 11, 2023
1 parent 4bc97e7 commit 1b0b795
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 18 deletions.
13 changes: 0 additions & 13 deletions .formatter.exs
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
locals_without_parens = [
attr: 2,
attr: 3,
live: 2,
live: 3,
live: 4,
on_mount: 1,
slot: 1,
slot: 2,
slot: 3
]

[
locals_without_parens: locals_without_parens,
import_deps: [:phoenix],
inputs: ["*.{ex,exs}", "{config,lib,test}/**/*.{ex,exs}"]
]
12 changes: 7 additions & 5 deletions lib/phoenix_live_view/async_result.ex
Original file line number Diff line number Diff line change
Expand Up @@ -398,14 +398,16 @@ defmodule Phoenix.LiveView.AsyncResult do
end

@doc """
Cancels an async assign.
Cancels an async operation.
Accepts either the `%AsyncResult{}` when using `assign_async/3` or
the keys passed to `start_async/3`.
## Examples
TODO fix docs
def handle_event("cancel_preview", _, socket) do
{:noreply, cancel_async(socket, :preview)}
end
cancel_async(socket, :preview)
cancel_async(socket, [:profile, :rank])
cancel_async(socket, socket.assigns.preview)
"""
def cancel_async(socket, async_or_keys, reason \\ nil)

Expand Down

0 comments on commit 1b0b795

Please sign in to comment.