Fix error when deleting members
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
95d065345b
commit
7d2b719ca2
3 changed files with 32 additions and 3 deletions
|
|
@ -50,7 +50,8 @@ defmodule MvWeb.MemberLive.Index do
|
|||
member = Ash.get!(Mv.Membership.Member, id)
|
||||
Ash.destroy!(member)
|
||||
|
||||
{:noreply, stream_delete(socket, :members, member)}
|
||||
updated_members = Enum.reject(socket.assigns.members, &(&1.id == id))
|
||||
{:noreply, assign(socket, :members, updated_members)}
|
||||
end
|
||||
|
||||
# Selects one member in the list of members
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue