Skip to content

Commit

Permalink
fix doc: Slot Attributes example table/1 code (#3571)
Browse files Browse the repository at this point in the history
Generate a `th`, instead of a `tr`, for each `col`.
  • Loading branch information
Devon-Olivier authored Dec 16, 2024
1 parent d26650d commit ea40066
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/phoenix_component.ex
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,8 @@ defmodule Phoenix.Component do
def table(assigns) do
~H"""
<table>
<tr :for={col <- @column}>
<th>{col.label}</th>
<tr>
<th :for={col <- @column}>{col.label}</th>
</tr>
<tr :for={row <- @rows}>
<td :for={col <- @column}>{render_slot(col, row)}</td>
Expand Down

0 comments on commit ea40066

Please sign in to comment.