Add key to li elements for servers.
This improves performance. If a new server was to be added interactively, then ALL li elements would update. With this key, only the new li element will be added.
This commit is contained in:
parent
b02d6d2bb9
commit
ea04b947e8
@ -38,7 +38,7 @@
|
||||
<ul>
|
||||
@foreach(var server in servers)
|
||||
{
|
||||
<li>
|
||||
<li @key="server.Id">
|
||||
@server.Name in @server.City is
|
||||
<span style="color:@(server.IsOnline ? "green" : "red")">
|
||||
@(server.IsOnline ? "online" : "offline")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user