forked from shibao/cannery
fix table component ids
This commit is contained in:
@ -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}
|
||||
/>
|
||||
|
@ -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
|
||||
|
@ -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}
|
||||
|
@ -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
|
||||
|
@ -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}
|
||||
|
@ -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}
|
||||
|
@ -115,7 +115,7 @@
|
||||
|
||||
<.live_component
|
||||
module={CanneryWeb.Components.TableComponent}
|
||||
id="pack_shot_records_table"
|
||||
id="pack-shot-records-table"
|
||||
columns={@columns}
|
||||
rows={@rows}
|
||||
/>
|
||||
|
@ -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}
|
||||
>
|
||||
|
@ -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}
|
||||
|
Reference in New Issue
Block a user