-
Notifications
You must be signed in to change notification settings - Fork 97
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
Selection controls do not function properly with SelectedValue of type bool?
#1812
Labels
Comments
exyi
added a commit
that referenced
this issue
May 7, 2024
* broken JS coercion from 'false' to boolean fixed * SelectorItems renders all non-string values as `data-bind='value: value'`. Knockout.js then reads the value binding instead of the value attribute, so we avoid the roundtrip through strings resolves #1812
Thanks for the bug report. While fixing this, I found that it works when you bind the booleans through |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dot:ComboBox
, and probably any other controls that derive fromSelector
, do not support (nullable) boolean properties. Selecting the option with the valuenull
behaves as expected, but selecting and other option will always set the value totrue
.Using
DotVVM.AspNetCore
version 4.2.6 onnet6.0
.Example code:
When
Choose an option...
is selected,dotvvm.viewModels.root.viewModel.Form.state.HasGenerator
evaluates tonull
. When any other option (Yes
orNo
) is selected,dotvvm.viewModels.root.viewModel.Form.state.HasGenerator
evaluates totrue
.(I am using
ComboBox
instead ofRadioButton
s for accessibility reasons on mobile.)The text was updated successfully, but these errors were encountered: