-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
[HxRadioButtonList][HxCheckboxList] Adds Toogle buttons to Radio and Checkbox lists #879
base: master
Are you sure you want to change the base?
[HxRadioButtonList][HxCheckboxList] Adds Toogle buttons to Radio and Checkbox lists #879
Conversation
Adds toggle option to HxRadioButtonList and HxCheckboxList
…s://github.com/mmonteagudo/Havit.Blazor into feature/HxRadio_CheckButtonListBase-ToggleView
@mmonteagudo Thanks for submitting this PR. I'd like to build on the base you've provided and fine-tune this feature so we can release it to production. @crdo Could you please take a look and add your review? |
if (inputAsToggleEffective != Bootstrap.InputAsToggle.Toggle) | ||
{ | ||
builder.OpenElement(100, "div"); | ||
// TODO CoreCssClass | ||
builder.AddAttribute(101, "class", CssClassHelper.Combine("form-check", Inline ? "form-check-inline" : null, ItemCssClassImpl, ItemCssClassSelectorImpl?.Invoke(item))); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Careful, this ignores ItemCssClass
and ItemCssClassSelector
for toggle buttons.
We need to decide whether we can make these work somehow, or if the combination with toggle buttons will be unsupported (in which case, we should probably throw an exception in OnParametersSet
).
/// <summary> | ||
/// Input as toggle or regular. | ||
/// </summary> | ||
[Parameter] public InputAsToggle? InputAsToggle { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API is up for discussion in the related issue #887.
This intent to add the Bootstrap Toogle buttons view for radio and checkbox lists https://getbootstrap.com/docs/5.3/forms/checks-radios/#toggle-buttons