馃悰 Bug Report
The AutoFocus parameter does not work when a component is being rendered conditionally.
馃捇 Repro or Code Sample
<FluentSwitch @bind-Value="showInput" Label="Show Input" />
<br />
@if (showInput)
{
<FluentTextInput @bind-Value="test" Label="Test" Autofocus />
}
@code {
private string test = string.Empty;
private bool showInput;
}
- Run code
- Press the switch
- Notice that the input won't get focused
馃 Expected Behavior
The input should become focused once it is visible
馃槸 Current Behavior
The input will become visible but won't be set in focus.
馃拋 Possible Solution
馃敠 Context
If you just render the component without the if then it actually will get focused.
馃實 Your Environment
- OS & Device: Windows 11 64 Bit
- Browser latest Firefox, Chrome, Edge
- latest dev-v5 branch
馃悰 Bug Report
The
AutoFocusparameter does not work when a component is being rendered conditionally.馃捇 Repro or Code Sample
馃 Expected Behavior
The input should become focused once it is visible
馃槸 Current Behavior
The input will become visible but won't be set in focus.
馃拋 Possible Solution
馃敠 Context
If you just render the component without the
ifthen it actually will get focused.馃實 Your Environment