fix table component ids

This commit is contained in:
2023-05-12 21:50:23 -04:00
parent 49628cb9bb
commit 2179bd5d86
16 changed files with 76 additions and 63 deletions

View File

@ -89,7 +89,7 @@ defmodule CanneryWeb.Components.MovePackComponent do
<% else %>
<.live_component
module={CanneryWeb.Components.TableComponent}
id="move_pack_table"
id="move-pack-table"
columns={@columns}
rows={@rows}
/>

View File

@ -141,7 +141,12 @@ defmodule CanneryWeb.Components.PackTableComponent do
def render(assigns) do
~H"""
<div id={@id} class="w-full">
<.live_component module={TableComponent} id={"table-#{@id}"} columns={@columns} rows={@rows} />
<.live_component
module={TableComponent}
id={"pack-table-#{@id}"}
columns={@columns}
rows={@rows}
/>
</div>
"""
end

View File

@ -74,7 +74,7 @@ defmodule CanneryWeb.Components.ShotRecordTableComponent do
<div id={@id} class="w-full">
<.live_component
module={CanneryWeb.Components.TableComponent}
id={"table-#{@id}"}
id={"shot-record-table-#{@id}"}
columns={@columns}
rows={@rows}
initial_key={:date}

View File

@ -192,7 +192,12 @@ defmodule CanneryWeb.Components.TypeTableComponent do
def render(assigns) do
~H"""
<div id={@id} class="w-full">
<.live_component module={TableComponent} id={"table-#{@id}"} columns={@columns} rows={@rows} />
<.live_component
module={TableComponent}
id={"type-table-#{@id}"}
columns={@columns}
rows={@rows}
/>
</div>
"""
end

View File

@ -51,7 +51,7 @@
<%= if @view_table do %>
<.live_component
module={CanneryWeb.Components.ContainerTableComponent}
id="containers_index_table"
id="containers-index-table"
action={@live_action}
containers={@containers}
current_user={@current_user}

View File

@ -120,7 +120,7 @@
<%= if @view_table do %>
<.live_component
module={CanneryWeb.Components.PackTableComponent}
id="type-show-table"
id="pack-show-table"
packs={@packs}
current_user={@current_user}
show_used={false}

View File

@ -115,7 +115,7 @@
<.live_component
module={CanneryWeb.Components.TableComponent}
id="pack_shot_records_table"
id="pack-shot-records-table"
columns={@columns}
rows={@rows}
/>

View File

@ -122,7 +122,7 @@
<% else %>
<.live_component
module={CanneryWeb.Components.ShotRecordTableComponent}
id="shot_records_index_table"
id="shot-records-index-table"
shot_records={@shot_records}
current_user={@current_user}
>

View File

@ -74,7 +74,7 @@
<% else %>
<.live_component
module={CanneryWeb.Components.TypeTableComponent}
id="types_index_table"
id="types-index-table"
action={@live_action}
types={@types}
current_user={@current_user}