Clean up code formatting and enhance data immutability
Standardized spacing and removed extraneous white space across multiple files for better readability. Updated several data grids to use `readonly` for `_data` collections, improving immutability and code clarity.
This commit is contained in:
@@ -1,19 +1,21 @@
|
||||
<MudDataGrid T="EntityMovementModel" Items="@_data"
|
||||
SortMode="SortMode.Multiple"
|
||||
<MudDataGrid T="EntityMovementModel" Items="@_data"
|
||||
SortMode="SortMode.Multiple"
|
||||
Filterable="true"
|
||||
Hideable="true">
|
||||
<Columns>
|
||||
<PropertyColumn Property="x => x.Parent.GetName()" Title="Entity"/>
|
||||
<PropertyColumn Property="x => x.Movement"/>
|
||||
<PropertyColumn Property="x => x.Speed" />
|
||||
<PropertyColumn Property="x => x.Speed"/>
|
||||
<PropertyColumn Property="x => x.Parent.GetFaction()" Title="Faction"/>
|
||||
<PropertyColumn Property="x => x.Parent.GetImmortal()" Title="Immortal"/>
|
||||
</Columns>
|
||||
</MudDataGrid>
|
||||
|
||||
@code {
|
||||
IEnumerable<EntityMovementModel> _data = DATA.Get()
|
||||
|
||||
readonly IEnumerable<EntityMovementModel> _data = DATA.Get()
|
||||
.SelectMany(e => e.Value.EntityParts)
|
||||
.OfType<EntityMovementModel>()
|
||||
.ToList();
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user