UKHO / admiralty-design-system

MIT License
4 stars 0 forks source link

[Feature] admiralty-radio-group to have a conditional revealing input #87

Closed developernm closed 1 week ago

developernm commented 1 year ago

Require a conditional revealing input on radio options similar to the GDS library (Links provided below). This is required as we have an issue with a formControlName being nested within this component, which overrides the parent formControlName, leading to the value not being maintained, which can be seen here below

image

  <admiralty-radio-group formControlName='dataInterpolated' <!--This value gets overwritten by dataInterpolatedOther when typing within the input, which removes the selected option value-->
                         displayVertical="true"
                         (admiraltyChange)="onDataInterpolatedChanged($any($event.target).value)"
                         [name]="'dataInterpolated'">
    <admiralty-radio [value]="true"
                     name="dataInterpolated">Yes</admiralty-radio>
    <admiralty-input *ngIf="selectedDataInterpolated !== 'false' && selectedDataInterpolated !== ''"
                     formControlName="dataInterpolatedOther"
                     class="radio-label"
                     [label]="'Please give further details:'"></admiralty-input>
    <admiralty-radio [value]="false"
                     name="dataInterpolated">No</admiralty-radio>
  </admiralty-radio-group>

GDS Radio component: https://design-system.service.gov.uk/components/radios/ GDS Radio component design: https://design-system.service.gov.uk/components/radios/conditional-reveal/index.html

UKHOGreg commented 1 year ago

Thanks very much for the feature request!

After discussion within the team, we have decided that there isn't quite the demand for this yet that would justify the time invested.

We may well re-open this issue down the line if we have more requests for this feature.

ecstaticrainbow commented 1 year ago

Raised an issue with the same information that focuses on the bug rather than the creation of a component #95 95

UKHOGreg commented 1 year ago

After discussion with Dave, we have decided to incorporate this as a standard option for the radio group.

Re-opening the issue.

github-actions[bot] commented 9 months ago

This issue is stale because it has been open for 100 days with no activity. Remove stale label or comment or this will be closed in 100 days

KatiePUX commented 4 months ago

Katie to liaise with Naran re: whether this is still an issue

KatiePUX commented 3 months ago

Conversation with Naran, this is still required. Component needs to be more dynamic.