I want to filter the options based on the constants. But it keeps showing the full list of the constants.
I have tried coded this way:
<EnumRadioGroup
TEnum="@ConceptConstants.MaritalStatus"
@bind-Value="@context.Status"
Options="GetFilteredMaritalStatusOptions">
</EnumRadioGroup>
protected IEnumerable<MaritalStatus> GetFilteredMaritalStatusOptions()
{
return Enum
.GetValues(typeof(MaritalStatus))
.Cast<MaritalStatus>()
.Where(status => status == MaritalStatus.Married || status == MaritalStatus.Single);
}
but is show me this error ->:
Cant convert from "method group" to
oneof.oneof <string[], antdesign radio option <Constance.ConceptConatst.MartialStatus>