From 26e2e5e7212505bf6945ac5dc63e619d268d0591 Mon Sep 17 00:00:00 2001 From: Joram Schrijver Date: Wed, 18 Oct 2023 09:18:07 +0200 Subject: [PATCH] Fix flash without ID not being closeable (#5602) --- installer/templates/phx_web/components/core_components.ex | 2 +- priv/templates/phx.gen.live/core_components.ex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/templates/phx_web/components/core_components.ex b/installer/templates/phx_web/components/core_components.ex index 85586fecaf..6f7d48c674 100644 --- a/installer/templates/phx_web/components/core_components.ex +++ b/installer/templates/phx_web/components/core_components.ex @@ -97,7 +97,7 @@ defmodule <%= @web_namespace %>.CoreComponents do <.flash kind={:info} flash={@flash} /> <.flash kind={:info} phx-mounted={show("#flash")}>Welcome Back! """ - attr :id, :string, default: nil, doc: "the optional id of flash container" + attr :id, :string, doc: "the optional id of flash container" attr :flash, :map, default: %{}, doc: "the map of flash messages to display" attr :title, :string, default: nil attr :kind, :atom, values: [:info, :error], doc: "used for styling and flash lookup" diff --git a/priv/templates/phx.gen.live/core_components.ex b/priv/templates/phx.gen.live/core_components.ex index 85586fecaf..6f7d48c674 100644 --- a/priv/templates/phx.gen.live/core_components.ex +++ b/priv/templates/phx.gen.live/core_components.ex @@ -97,7 +97,7 @@ defmodule <%= @web_namespace %>.CoreComponents do <.flash kind={:info} flash={@flash} /> <.flash kind={:info} phx-mounted={show("#flash")}>Welcome Back! """ - attr :id, :string, default: nil, doc: "the optional id of flash container" + attr :id, :string, doc: "the optional id of flash container" attr :flash, :map, default: %{}, doc: "the map of flash messages to display" attr :title, :string, default: nil attr :kind, :atom, values: [:info, :error], doc: "used for styling and flash lookup"