Files
2023-03-02 08:48:11 +01:00

42 lines
936 B
C#

using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
namespace StockMan.CORE.Components
{
public partial class VisualButtons
{
#region Public Properties
[Parameter]
public EventCallback<bool> callbackForJs { get; set; }
[Parameter]
public string idForJs { get; set; } = "";
#endregion Public Properties
#region Protected Fields
protected bool editMode = false;
#endregion Protected Fields
#region Protected Properties
[Inject]
protected IJSRuntime JSRuntime { get; set; } = null!;
#endregion Protected Properties
#region Private Methods
private async Task enableEdit()
{
await callbackForJs.InvokeAsync(editMode);
editMode = true;
await JSRuntime.InvokeVoidAsync("isEditing", idForJs);
}
#endregion Private Methods
}
}