Skip to content

Commit a790d59

Browse files
committed
Fixes: issue where list could get out of order from results.
Updates Framework target .Net8/.Net9 Adds: OnDataChanged To Sortable It's self Changes: all JSInvokable Methods are now Tasks and are awaited.
1 parent d9f2421 commit a790d59

File tree

340 files changed

+227
-135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

340 files changed

+227
-135
lines changed

BlazorSortableJS.Demo/BlazorSortableJS.Demo.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
</PropertyGroup>

BlazorSortableJS.Docs/BlazorSortableJS.Docs.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<RootNamespace>BlazorSortableJS.Docs</RootNamespace>
@@ -14,7 +14,7 @@
1414
</ItemGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.4" />
17+
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.0" />
1818
<PackageReference Include="Markdig.SyntaxHighlighting" Version="1.0.0-custom" />
1919
<PackageReference Include="Markdig" Version="0.26.0" />
2020
</ItemGroup>

BlazorSortableJS.Docs/Samples/Components/SharedLists.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
<h6 class="text-center fw-bold">Set 1</h6>
55
<Sortable TItem="string" Items="items" Class="list-group" Options="_options">
66
<Template Context="item">
7-
<div class="list-group-item">@item</div>
7+
<div class="list-group-item" @key="item">@item</div>
88
</Template>
99
</Sortable>
1010
</div>
1111
<div class="col-4">
1212
<h6 class="text-center fw-bold">Set 2</h6>
1313
<Sortable TItem="string" Items="items2" Class="list-group" Options="_options">
1414
<Template Context="item">
15-
<div class="list-group-item tinted">@item</div>
15+
<div class="list-group-item tinted" @key="item">@item</div>
1616
</Template>
1717
</Sortable>
1818
</div>

BlazorSortableJS.Docs/Samples/Components/SimpleList.razor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
animation = 150,
2626
ghostClass = "blue-background-class"
2727
};
28+
2829
private List<string> items = new List<string>
2930
{
3031
"Item 1-1",

BlazorSortableJS.Docs/wwwroot/Samples/Components/SharedLists.md

Lines changed: 2 additions & 2 deletions

BlazorSortableJS.Docs/wwwroot/Samples/Components/SimpleList.md

Lines changed: 7 additions & 1 deletion

BlazorSortableJS.WASM/BlazorSortableJS.WASM.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.4" />
11-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.4" PrivateAssets="all" />
10+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.0" />
11+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.0" PrivateAssets="all" />
1212
</ItemGroup>
1313

1414
<ItemGroup>

BlazorSortableJS.sln

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.6.33513.286
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorSortableJS.Demo", "BlazorSortableJS.Demo\BlazorSortableJS.Demo.csproj", "{8B68FE92-34BA-4A37-B7F4-887156F6C995}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorSortableJS.Demo", "BlazorSortableJS.Demo\BlazorSortableJS.Demo.csproj", "{8B68FE92-34BA-4A37-B7F4-887156F6C995}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorSortableJS", "BlazorSortableJS\BlazorSortableJS.csproj", "{669321D7-F88F-479A-A9D3-68C0144981F6}"
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorSortableJS", "BlazorSortableJS\BlazorSortableJS.csproj", "{669321D7-F88F-479A-A9D3-68C0144981F6}"
99
EndProject
10-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorSortableJS.Docs", "BlazorSortableJS.Docs\BlazorSortableJS.Docs.csproj", "{39B09C26-A1EC-4542-82D4-4D21831BE856}"
10+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorSortableJS.Docs", "BlazorSortableJS.Docs\BlazorSortableJS.Docs.csproj", "{39B09C26-A1EC-4542-82D4-4D21831BE856}"
1111
EndProject
12-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorSortableJS.WASM", "BlazorSortableJS.WASM\BlazorSortableJS.WASM.csproj", "{79B32E3C-8C86-4A89-B5FC-C1EC7D735C1D}"
12+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorSortableJS.WASM", "BlazorSortableJS.WASM\BlazorSortableJS.WASM.csproj", "{79B32E3C-8C86-4A89-B5FC-C1EC7D735C1D}"
1313
EndProject
1414
Global
1515
GlobalSection(SolutionConfigurationPlatforms) = preSolution

BlazorSortableJS/BlazorSortableJS.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
4+
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<PackageId>BlazorSortableJs</PackageId>
@@ -16,19 +16,19 @@
1616
<RepositoryUrl>https://github.com/jbomhold3/BlazorSortableJS</RepositoryUrl>
1717
<RepositoryType>git</RepositoryType>
1818
<Copyright>John J Bomhold</Copyright>
19-
<Version>2.0.0-Preview2</Version>
19+
<Version>2.0.0-Preview3</Version>
2020
</PropertyGroup>
2121

2222

2323
<ItemGroup>
2424
<SupportedPlatform Include="browser" />
2525
</ItemGroup>
2626

27-
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
27+
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
2828
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.*" />
2929
</ItemGroup>
3030

31-
<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
31+
<ItemGroup Condition=" '$(TargetFramework)' == 'net9.0' ">
3232
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.*" />
3333
</ItemGroup>
3434
</Project>

BlazorSortableJS/KeyedItem.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace BlazorSortableJS
2+
{
3+
internal sealed class KeyedItem<T>
4+
{
5+
public string Key { get; set; } = Guid.NewGuid().ToString();
6+
public T Item { get; set; }
7+
}
8+
}

0 commit comments

Comments
 (0)