Hello. I'm building a TelerikForm, and I need to show a TextField if 'Other' is selected.
The conditional rendering seems to work perfectly when the 'parent' item is a TelerikMultiSelect, but does not work with the auto-generated Enum field.
I have verified that the field in question is indeed being set to CompanyType.Other, yet the "Other Legal Entity Type" field is not showing.
What am I missing?
<FormGroup LabelText="Legal Information" Columns="2" ColumnSpacing="15px">
<FormItem Field="@nameof(formInfo.LegalEntity)"></FormItem>
@if (formInfo.LegalEntity == CompanyType.Other) // this does not work
{
<FormItem LabelText="Other Legal Entity Type" Field="@nameof(formInfo.OtherLegalEntityType)"></FormItem>
}
</FormGroup>
<FormGroup LabelText="Operations" Columns="2" ColumnSpacing="15px">
<FormItem Field="@nameof(formInfo.ProductDelivery)">
<Template>
<TelerikMultiSelect Data="formInfo.productDeliveryOptions" @bind-Value="formInfo.ProductDelivery" />
</Template>
</FormItem>
@if (formInfo.ProductDelivery.Contains("Other")) // this works as expected
{
<FormItem LabelText="Other Product Delivery Type" Field="@nameof(formInfo.OtherProductDeliveryType)"></FormItem>
}
</FormGroup>