Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor RadioButton to unify client/server rendering #1667

Merged
merged 3 commits into from
Sep 8, 2023

Conversation

exyi
Copy link
Member

@exyi exyi commented Jul 1, 2023

  • all properties (Checked, Enabled, GroupName) will render both knockout expression and the value
  • if value binding is used and evaluation fails, the exception is ignored (as in HtmlGenericControl, new helper method was added for this)
  • GroupName now allows value bindings - this might be useful for usage in client-side Repeater

resolves #1538

}

// if (!IsPropertySet(CheckedValueProperty))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please test if this would work without CheckedValue:

<dot:RadioButton Checked="{value: IsPerson}" GroupName="RadioGroup" Text="person" />
<dot:RadioButton Checked="{value: IsCompany}" GroupName="RadioGroup" Text="company" />

<p>Is person: {{value: IsPerson}}</p>
<p>Is company: {{value: IsCompany}}</p>

* all properties (Checked, Enabled, GroupName) will render both knockout expression and the value
* if value binding is used and evaluation fails, the exception is ignored (as in HtmlGenericControl, new helper method was added for this)
* GroupName now allows value bindings - this might be useful for usage in client-side Repeater

resolves #1538
@tomasherceg tomasherceg merged commit 9ad38f5 into main Sep 8, 2023
14 checks passed
@tomasherceg tomasherceg deleted the radiobutton-refactor branch September 8, 2023 12:28
@exyi exyi added this to the Version 4.2 milestone Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RadioButton is not checked if server rendermode was choosed
2 participants