title: Blazor child component templated/render fragment issue
body: <p>I have an oddity with Blazor's templated components that I'm looking for guidance on.</p>
  
  <p>I have two components, one called DataTable and one called DataModal. Both take generic TItem as a type parameter to render a table of items using render fragments for the mark-up.</p>
  
  <p>DataTable renders the table HTML and DataModal is a bootstrap modal wrapper that contains a DataTable component as a child component. The idea is to show a modal dialog with a data table for user selection.</p>
  
  <p>When the DataTable component is used on it's own as part of a page component, it works fine. When the DataModal component is used, passing the same item collection (as TItem) and same render fragment markup I don't get the correct content in the DataTable. Instead I get the fragment and TItem assembly name for the same number of items.</p>
  
  <p>This is the markup for the Data table component embedded on a page:</p>
  
  <pre><code>&lt;DataTable TItem="TicketSummaryModel" PageNumberChanged="OnPageChanged" Class="table table-hover table-striped dataTable responsive no-footer" RowClicked="@OnRowClicked" Items="SearchedTickets.Data"
                                     TotalRecords="@SearchedTickets.RecordsTotal" TotalPages="SearchedTickets.PagesTotal"&gt;
     &lt;DataTableHeader&gt;
         &lt;th&gt;Ticket Number&lt;/th&gt;
         &lt;th&gt;Updated On&lt;/th&gt;
         &lt;th&gt;Title&lt;/th&gt;
         &lt;th&gt;Created By&lt;/th&gt;
         &lt;th&gt;Category&lt;/th&gt;
         &lt;th&gt;Status&lt;/th&gt;
     &lt;/DataTableHeader&gt;
     &lt;DataRowTemplate&gt;
         &lt;td&gt;&lt;i class="fas fa-circle mr-1 @context.PriorityClass"&gt;&lt;/i&gt; @context.TicketNumber&lt;/td&gt;
         &lt;td&gt;@context.UpdatedOn&lt;/td&gt;
         &lt;td&gt;@context.Title&lt;/td&gt;
         &lt;td&gt;@context.CreatedByUser&lt;/td&gt;
         &lt;td&gt;@context.Category&lt;/td&gt;
         &lt;td&gt;&lt;i class="fas fa-square mr-1 @context.StatusClass"&gt;&lt;/i&gt; @context.Status&lt;/td&gt;
      &lt;/DataRowTemplate&gt;
  </code></pre>
  
  <p></p>
  
  <p>This outputs correctly, each property in the render fragment is correctly shown as a  element inside the table.</p>
  
  <p>When I do the same with the DataModal component inside a page the problem occurs:</p>
  
  <pre><code>&lt;DataModal @ref="modalRef" TitleClass="bg-primary" ModalSize="ModalSize.ExtraLarge" Title="Test Modal" Items="@SearchedTickets.Data"
                     TitleIcon="fa-check" TItem="TicketSummaryModel" TableClass="table table-hover table-striped dataTable responsive no-footer"
                     TotalRecords="@SearchedTickets.RecordsTotal" TotalPages="SearchedTickets.PagesTotal"&gt;
              &lt;DataTableHeader&gt;
                  &lt;th&gt;Ticket Number&lt;/th&gt;
                  &lt;th&gt;Updated On&lt;/th&gt;
                  &lt;th&gt;Title&lt;/th&gt;
                  &lt;th&gt;Created By&lt;/th&gt;
                  &lt;th&gt;Category&lt;/th&gt;
                  &lt;th&gt;Status&lt;/th&gt;
              &lt;/DataTableHeader&gt;
              &lt;DataRowTemplate&gt;
                  &lt;td&gt;&lt;i class="fas fa-circle mr-1 @context.PriorityClass"&gt;&lt;/i&gt; @context.TicketNumber&lt;/td&gt;
                  &lt;td&gt;@context.UpdatedOn&lt;/td&gt;
                  &lt;td&gt;@context.Title&lt;/td&gt;
                  &lt;td&gt;@context.CreatedByUser&lt;/td&gt;
                  &lt;td&gt;@context.Category&lt;/td&gt;
                  &lt;td&gt;&lt;i class="fas fa-square mr-1 @context.StatusClass"&gt;&lt;/i&gt; @context.Status&lt;/td&gt;
              &lt;/DataRowTemplate&gt;
  &lt;/DataModal&gt;
  </code></pre>
  
  <p>The DataModal component markup is as follows:</p>
  
  <pre><code>@inherits DataModalBase&lt;TItem&gt;
  @typeparam TItem
  
  &lt;Modal @ref="@ModalRef"&gt;
          &lt;ModalContent Size="@ModalSize" IsCentered="true"&gt;
              &lt;ModalHeader Class="@TitleClass"&gt;
                  &lt;ModalTitle&gt;
                      @if (Title != null)
                      {
                          @if (TitleIcon != null)
                          {
                              &lt;i class="@("fal " + TitleIcon) mr-2"&gt;&lt;/i&gt;
                          }
                          @Title
                      }
                  &lt;/ModalTitle&gt;
                  &lt;CloseButton Clicked="Close" /&gt;
              &lt;/ModalHeader&gt;
              &lt;ModalBody&gt;
                  @if (Items != null)
                  {
                      &lt;DataTable TItem="TItem" Class="@TableClass" Items="@Items"&gt;
                          &lt;DataTableHeader&gt;
                              @DataTableHeader
                          &lt;/DataTableHeader&gt;
                          &lt;DataRowTemplate&gt;
                              @DataRowTemplate
                          &lt;/DataRowTemplate&gt;
                      &lt;/DataTable&gt;
                  }
                  else
                  {
                      &lt;div class="mr-auto ml-auto mt-4 mb-4"&gt;
                          &lt;div class="lds-hourglass"&gt;&lt;/div&gt;
                      &lt;/div&gt;
                  }
              &lt;/ModalBody&gt;
          &lt;/ModalContent&gt;
  &lt;/Modal&gt;
  </code></pre>
  
  <p>The modal shows a table, the headers are correct from the DataTableHeader render fragment and the number of rows for the items data is correct. The problem is the output of the DataRowTemplate render fragment is now just the assembly names:</p>
  
  <pre><code>Microsoft.AspNetCore.Components.RenderFragment`1[MyProject.Models.Tickets.TicketSummaryModel]
  Microsoft.AspNetCore.Components.RenderFragment`1[MyProject.Models.Tickets.TicketSummaryModel]
  Microsoft.AspNetCore.Components.RenderFragment`1[MyProject.Models.Tickets.TicketSummaryModel]
  Microsoft.AspNetCore.Components.RenderFragment`1[MyProject.Models.Tickets.TicketSummaryModel]
  ...
  </code></pre>
  
  <p>Any idea why this is happening? Both the DataModal and the DataTable use the exact same declarations for the collection of items to show:</p>
  
  <pre><code>[Parameter] public IEnumerable&lt;TItem&gt; Items { get; set; } // The data items
  [Parameter] public RenderFragment&lt;TItem&gt; DataRowTemplate { get; set; } // The HTML markup for each row
  </code></pre>
  
  <p>The DataTable renders the DataRowTemplate using the following code which again works when the DataTable is used outside of a parent but not within as a child (inside DataModal):</p>
  
  <pre><code>&lt;tbody&gt;
      @if (Items != null)
      {
          @foreach (var item in Items)
          {
              &lt;tr @onclick="@(() =&gt; OnRowClicked(item))"&gt;@DataRowTemplate(item)&lt;/tr&gt;
          }
      }
  &lt;/tbody&gt;
  </code></pre>
  
  <p>If you need more information to assist in this issue let me know.</p>