Skip to content
Merged
Prev Previous commit
Next Next commit
Changed example back to two lists
The swapping is still handled differently (getting the list through the ids) than before.
  • Loading branch information
RReventlov committed Jul 15, 2024
commit 874417cfd7ec0831b147fbd2329a51fe0d2ec395
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
.fluent-sortable-list.darker {
--fluent-sortable-list-background-color: var(--neutral-layer-4) !important;
}
.fluent-sortable-list.lighter {
--fluent-sortable-list-background-color: var(--neutral-layer-1) !important;
}
</style>


Expand All @@ -21,12 +18,6 @@
<ItemTemplate>@item.Name</ItemTemplate>
</FluentSortableList>
</FluentGridItem>
<FluentGridItem xs="12" sm="6">
<h5>List 3</h5>
<FluentSortableList Id="shared3" Class="lighter" Group="sharedLists" OnUpdate="@HandleSort" OnRemove="@HandleRemove" Items="@items3" Context="item">
<ItemTemplate>@item.Name</ItemTemplate>
</FluentSortableList>
</FluentGridItem>
</FluentGrid>

@code {
Expand All @@ -42,8 +33,6 @@

public List<Item> items2 = Enumerable.Range(11, 10).Select(i => new Item { Id = i, Name = $"Item {i}" }).ToList();

public List<Item> items3 = Enumerable.Range(21, 10).Select(i => new Item { Id = i, Name = $"Item {i}" }).ToList();


private void HandleRemove(FluentSortableListEventArgs args)
{
Expand Down Expand Up @@ -97,7 +86,6 @@
{
"shared1" => items1,
"shared2" => items2,
"shared3" => items3,
_ => throw new ArgumentException($"No list with id {id}")
};

Expand Down