@foreach ((Employee, int) result in searchResults)
{
<tr>
<th scope="row">@result.Item1.Forename, @result.Item1.Surname
<i class="bi bi-info-circle" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasRight" aria-controls="offcanvasRight"></i>
<div class="offcanvas offcanvas-end" tabindex="-1" id="offcanvasRight" aria-labelledby="offcanvasRightLabel">
<div class="offcanvas-header">
<h5 id="offcanvasRightLabel">@result.Item1.Forename, @result.Item1.Surname</h5>
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<Profile4Search Id = "@result.Item1.Id"/>
</div>
</div>
</th>
I want to put offcanvas
for Employee's information but the Profile4Search
components are not rerendered and always show the same information. How can I rerender the component in foreach loop?
i thought , the component ProfileSearch receive Id from Parameter and show detail of each employees (if user clicks icon)but its rendered only once, and show same Employee's Detail(here the first Employee in loop).