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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user