New component: RadioButton
(not RadioButtons
)
#937
Labels
area/accessibility
related to WCAG and accessibility
area/data-storage
area/layout
related to layouts/components
area/table
related to grid/list/repeating groups
kind/feature-request
New feature or request
Background
When analyzing these two issues closely, a misunderstanding on my part is uncovered:
It is noted in #298 that it should be possible to include a radio button in the
Grid
/table. From this, I assumed we meant our existingRadioButtons
component - however in my imagination I could't quite see how that would look nice.RadioButtons
is akin to a radio group, and contains multiple radio buttons, andGrid
is specified to be configurable to display one layout component per cell. Displaying multiple radio buttons per cell of aGrid
might work, at least with some layout tweaking.However, what was really requested here was to have one radio button per cell, while each one of them belong to a larger radio group. One way to solve that would be to use the
Likert
component, but that might not be flexible enough when it comes to the setup (what if you want the radio group to span an entire column instead of a row?).This issue is for implementing a component that represents a single radio button. Having multiple of these components bound to the same data model binding would implicitly make them a radio group (akin to
RadioButtons
). Using such a component in a stand-alone configuration might not behave the way you'd like it to, but in combination with other components its usefulness shines:Use case 1 (in
Grid
)It should be possible to add this component to a
Grid
cell, and having multiple of them behave like a radio group when bound to the same location in the data model. No title or label should be displayed, just the radio button (we'll assume the app developer configures a header on the row/column).Use case 2 (in repeating
Group
table)After #579 is implemented, a single
RadioButton
component as a child of a repeating group, hidden inside the group itself but visible in the table overview, could be used to fulfill the use-case of selecting a single row, and as such overlap with theList
component in functionality (especially if the List component gets support for referencing a repeating group as its data source).For this use-case, every
RadioButton
inside the repeating group would have to have a data model binding outside the repeating group (not just something likeGroup.IsSelected
, which might work for a single checkbox - but that would implement multi-selection of rows). For it to be possible to select a row, a unique property inside the row has to be bound as a value to the radio button.Considerations
Grid
, this might be the column/row header, but in a standalone mode, this is most likely a value intextResourceBinding
.required
orreadOnly
settings, how do we resolve that?Configuration suggestion
Relevant issues
Checkbox
(notCheckboxes
) #681The text was updated successfully, but these errors were encountered: