I have the following table in my razor view:
<thead>
<tr>
<th>
<span class="handicap-headers">@Html.DisplayNameFor(model => sampleModel.PlayerName)</span>
<a asp-action="Index" asp-route-id="@Model.LeagueId" asp-route-sortOrder="@HandicapSortOrder.PlayerNameAsc" class="handicap-headers">
<i class="fas fa-sort-up bigger-fa-icons"></i>
</a>
@* <a asp-action="Index" asp-route-id="@Model.LeagueId" asp-route-sortOrder="@HandicapSortOrder.PlayerNameDesc">
<i class="fas fa-sort-down bigger-fa-icons"></i>
</a>*@
</th>
<th>
@Html.DisplayNameFor(model => sampleModel.Current)
</th>
<th>
<span class="handicap-headers">@Html.DisplayNameFor(model => sampleModel.HandicapForDisplay)</span>
<a asp-action="Index" asp-route-id="@Model.LeagueId" asp-route-sortOrder="@HandicapSortOrder.HandicapAsc" class="handicap-headers">
<i class="fas fa-sort-up bigger-fa-icons"></i>
</a>
<a asp-action="Index" asp-route-id="@Model.LeagueId" asp-route-sortOrder="@HandicapSortOrder.HandicapDesc">
<i class="fas fa-sort-down bigger-fa-icons"></i>
</a>
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model.PlayerHandicaps)
{
<tr>
<td>
<a asp-controller="PlayerScore" asp-action="Index" asp-route-playerId="@item.PlayerId" asp-route-leaguePadId="@item.LeaguePadId">@Html.DisplayFor(modelItem => item.PlayerName)</a>
</td>
<td>
@Html.DisplayFor(modelItem => item.Current)
</td>
<td>
@Html.DisplayFor(modelItem => item.HandicapForDisplay)
</td>
</tr>
}
</tbody>
</table>
For some reason, when I display the icons, I am getting this weird '-' char after the first icon. I have tried reordering the icons and it sticks to whichever is the first icon. Not sure what the issue is here or what I might be doing wrong.
FYI - I commented out one of the icons just for testing purposes. When I have just one icon, it doesn't have an issue. You can see the example of the '-' char in the last column