Skip to content

Instantly share code, notes, and snippets.

Created April 8, 2021 10:25
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
RadioOptionGroup is always re-rendering children
@page "/"
@using Microsoft.AspNetCore.Components.Forms;
<h1>Hello, world!</h1>
<EditForm Model=@Options>
Radio buttons:
<InputRadioGroup @bind-Value="@RadioGroupVal">
@foreach (var opt in Options) {
<RadioOption @key="opt"/>
Click the checkbox:
<button type="button" @onclick="@StateHasChanged"/>
@code {
private List<string> Options = new List<string>() { "A", "B", "C" };
private bool DoesNotMatter {get;set;}
private string RadioGroupVal{get;set;}
@using Microsoft.AspNetCore.Components.Forms;
<div style="border: 1px solid black">
<InputRadio Value="Does not matter"/>
@code {
public DateTime InitTime = DateTime.Now;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment