79651527

Date: 2025-06-03 15:39:01
Score: 0.5
Natty:
Report link

Changed the code to make the Auto Focus:

    <ActionButton id="MudButtonSearch"
              AutoFocus="false"
              ButtonType="ButtonType.Submit"
              Disabled="@(!context.Validate() || model.ProviderNumber == null)"
            Search
    </ActionButton>

// ----

private bool autoFocus = false;

private async Task<IEnumerable<string>> SearchProviderNumbers(string providerNumber, CancellationToken token)
{
    var result = (IEnumerable<string>) dtoConfig.ProviderNumbersSearchData
            v.Where(x => x.StartsWith(providerNumber, StringComparison.InvariantCultureIgnoreCase)).ToList();
    
    if (result.Count() == 0)
    {
        autoFocus = true;
    }
}

The new code executed, but the results were the same.

I don't think changing makes any difference and that this request cannot be satisfied.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: socker_dad