Skip to content

Conversation

cityremade
Copy link
Member

Creates:

  • ui element radio
  • location entry radiogroup
  • radio element stylesheet

Possible configuration requires at least 2 boolean fields meant to be mutually exclusive.

Checking one unchecks all others.

Use case: select model type and use only relevant input - conditionals within on change callbacks at a further stage.

{
  "field":"model_food",
  "title":"Model Type",
  "label":"Food",
  "type":"radiogroup",
  "edit":true,
  "radiogroup":{
    "name":"my_model_type",
    "caption":"Select model type to run for this site"
  }
},
{
  "field":"model_clothes",
  "label":"Clothes",
  "type":"radiogroup",
  "edit":true,
  "radiogroup":{
    "name":"my_model_type"
  }
},
{
  "field":"model_home",
  "label":"Home",
  "type":"radiogroup",
  "edit":true,
  "radiogroup":{
    "name":"my_model_type"
  }
}
Screenshot 2025-09-22 at 15 33 17

@cityremade cityremade linked an issue Sep 22, 2025 that may be closed by this pull request
@cityremade cityremade self-assigned this Sep 22, 2025
@cityremade cityremade added Feature New feature requests or changes to the behaviour or look of existing application features. UI labels Sep 22, 2025
@cityremade cityremade marked this pull request as ready for review September 22, 2025 14:44
Copy link
Contributor

@simon-leech simon-leech left a comment

Choose a reason for hiding this comment

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

The radiogroup should be almost identical to the text dropdown entry method but only allowing a single selection.

It should support getting the values from a query - it should support everything a text entry, does with the caveat you can only select one value :)

@cityremade
Copy link
Member Author

cityremade commented Sep 23, 2025

Radiobutton is a boolean at its root. It only knows if it's on or off.
Think about it as a group of mutually exclusive checkboxes.

Value updates and callbacks should be handled with onchange radiogroup event and will be added later outside this pr.

@RobAndrewHurst RobAndrewHurst changed the title Radio element and radiogroup. feat(radio): Radio element and radiogroup init Sep 25, 2025
Copy link
Member

@dbauszus-glx dbauszus-glx left a comment

Choose a reason for hiding this comment

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

Can you resolve the merge conflict and the sonar cloud issues?
image

Copy link

Copy link
Member

@dbauszus-glx dbauszus-glx left a comment

Choose a reason for hiding this comment

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

This doesn't match the specification of the ticket. I'd like to see the radio element first as a susbtitute for a single select dropdown element before creating a complex multiple related boolean fields use case and then finding a problem for this solution.

@cityremade cityremade marked this pull request as draft October 2, 2025 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature requests or changes to the behaviour or look of existing application features. UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Radio select element as input for single select options
4 participants