Blazor server side error reported MudInput.FocusAsync: ElementReference has not been configured correctly given the below configuration and all 6 fields completed; pressing tab or moving focus with cursor causes the error to repeat.
The code here needs check the length does not exceed the Count value.
Suggest
int focusIndex = Math.Min(Count-1, str.Length);
<MudCodeInput Class="login"
InputType="InputType.Number"
T="string"
@bind-Value="@_inputCode"
Count="6"
Spacing="2"
Variant="Variant.Outlined"
Margin="Margin.None"
Required="true"/>