1
0

43 lines
906 B
Plaintext

<table class="table table-striped">
<RepeaterComponent Items="this.servers">
<Header>
<thead>
<tr>
<th>Name</th>
<th>City</th>
<th>Status</th>
<th>People online</th>
<th></th>
<th></th>
</tr>
</thead>
</Header>
<Row Context="server">
<ServerComponent server="server"></ServerComponent>
</Row>
<Footer>
</Footer>
</RepeaterComponent>
</table>
@code {
private List<Server>? servers;
[Parameter]
public string? CityName { get; set; }
[Parameter]
public string SearchFilter { get; set; } = "";
protected override void OnParametersSet()
{
if (string.IsNullOrWhiteSpace(this.SearchFilter))
{
servers = ServersRepository.GetServersByCity(CityName ?? "Eindhoven");
}
else
{
servers = ServersRepository.SearchServers(SearchFilter);
}
}
}