BlazorReorder/BlazorReorderExample/Program.cs
elgransan 55f8ab5329
Drag between lists (#1)
* * first approach with some issues
* modified service name
* added better handle of listeners
* addded new page

* * added css for empty list
* added posiblity to drag to an empty list
* corrected bug when blazor reload elements between a query to DOM
* corrected bug handling elementreferences
* corrected bug ondrop ghost still appears

* * corrected styles
* better example with three lists

Co-authored-by: Santiago Cattaneo <santiago@rd-its.com>
2022-04-11 13:16:52 -03:00

14 lines
575 B
C#

using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using BlazorReorderExample;
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
builder.RootComponents.Add<HeadOutlet>("head::after");
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
builder.Services.AddScoped<BlazorReorderList.ReorderService<ListItem>>();
await builder.Build().RunAsync();
public record ListItem(string title, string url, string details);