pour aurian sous la menace
continuous-integration/drone/push Build is passing Details

master
remrem 2 years ago
parent 6e754626cb
commit 9cb1d36242

@ -20,4 +20,7 @@
<div class="actions" id="actions">
</div>
</div>
<InventoryList/>
</CascadingValue>

@ -3,6 +3,7 @@ using Blazor.Pages;
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
namespace Blazor.Components
{
@ -18,6 +19,7 @@ namespace Blazor.Components
public Inventory()
{
Actions = new ObservableCollection<InventoryAction>();
Actions.CollectionChanged += OnActionsCollectionChanged;
}
public void update()
{
@ -25,6 +27,9 @@ namespace Blazor.Components
return;
}
private void OnActionsCollectionChanged(object? sender, NotifyCollectionChangedEventArgs e)
{
JavaScriptRuntime.InvokeVoidAsync("Crafting.AddActions", e.NewItems);
}
}
}

@ -5,8 +5,6 @@
width: 40%;
}
.actions {
border: 1px solid black;
height: 250px;

Loading…
Cancel
Save