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 EditButtons
{
#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 disableEdit()
{
await callbackForJs.InvokeAsync(editMode);
editMode = false;
await JSRuntime.InvokeVoidAsync("noEditing", idForJs);
}
#endregion Private Methods
}
}