I have an app where the visibility of a RadzenSteps
component is dependent on a string which the user types in a TextBox. If the string is NullOrWhiteSpace
, the steps should not be visibile. It is working fine the first time, i.e., at the beginning when the page is loaded, the steps are not visible and then when I type in the textbox and press ENTER, the steps become visible. However, after that if I clear the textbox and then input again in the textbox, the steps inside the component are not shown, only the next and previous buttons are visible.
Here is my Test.razor
page:
@page "/test"
<RadzenFieldset Text="Organisation Name">
<div class="form-row">
<div class="form-group col-md-3">
<RadzenLabel Text="Organisation Name" />
<RadzenTextBox Name="Organisation Name" @bind-Value="_name" Style="width: 100%" Trim="true"/>
</div>
</div>
</RadzenFieldset>
<RadzenSteps Visible="@(!string.IsNullOrWhiteSpace(_name))" Style="width: 100%; margin-top: 20px;">
<Steps>
<RadzenStepsItem Text="One">
<div>
<h1>1</h1>
</div>
</RadzenStepsItem>
<RadzenStepsItem Text="Two">
<div>
<h1>2</h1>
</div>
</RadzenStepsItem>
</Steps>
</RadzenSteps>
And here is my Test.razor.cs
file:
namespace BlazorApp1.Pages;
public partial class Test
{
private string? _name;
}
Am I missing something here?
PS: I am using .Net6