using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Components; using System.Net.Http; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Components.Authorization; using Microsoft.AspNetCore.Components.Forms; using Microsoft.AspNetCore.Components.Routing; using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.Web.Virtualization; using Microsoft.JSInterop; using MP.INVE; using MP.INVE.Shared; using MP.INVE.Components; namespace MP.INVE.Components { public partial class CodeScan { // FIXME TODO creare evento x riportare scansione /// /// Imposta il focus su input scansione /// protected void setFocus() { // all'apertura del componente -_> focus su txtbox scan (e anche dopo input) } private ElementReference target; protected string lastScan { get; set; } = ""; protected string rawScan { get; set; } = ""; protected override async Task OnAfterRenderAsync(bool firstRender) { if (firstRender) { await target.FocusAsync(); } } } }