Export RadioControlRegistry to be able to use it for custom implementations of ControlValueAccessor
See original GitHub issue🚀 feature request
Relevant Package
This feature request is for @angular/forms.
Description
I am trying to implement ControlValueAccessor
for a custom radio component, but the problem is that for radio buttons we need to deselect/select other radios of the same group when one is selected as it is done in https://github.com/angular/angular/blob/c0523fc3b45cdb5ba52109f7ae0e4dab555b7d72/packages/forms/src/directives/radio_control_value_accessor.ts using RadioControlRegistry
, except that this registry is not exported for external use.
Describe the solution you’d like
Export RadioControlRegistry
to be able to use it when implementing ControlValueAccessor
without needing to create a new one internally in the project where it’s being implemented.
I can propose a PR if you consider this as needed.
Describe alternatives you’ve considered
N/A
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Custom Form Inputs with ControlValueAccessor - ngconf
The first step in creating our custom input with control value accessor is to implement the ControlValueAccessor interface. This requires us to ...
Read more >Why is my radio input element inside a custom component not ...
The answer to why my Stackblitz sample does not work as expected is found in the source code for RadioControlRegistry (packages/forms/src/ ...
Read more >Never again be confused when implementing ... - InDepth.Dev
Dive deep into the implementation details of the ControlValueAccessor that acts as a generic mechanism between Angular's formControl and a native/custom form ...
Read more >How To Use ControlValueAccessor to Create Custom Form ...
Learn how to implement the ControlValueAccessor interface to seamlessly integrate custom form controls into your forms.
Read more >Open Source Used In MSX Managed Device Service Pack 4.0.0
1.2.1 Available under license : Apache License. Version 2.0, January 2004 http://www.apache.org/licenses/. TERMS AND CONDITIONS FOR USE, REPRODUCTION, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @abarghoud, thanks for creating this ticket and describing your request. I believe the best way for now would be to create your own service (similar to what
RadioControlRegistry
does) and we’ll keep this ticket open to collect more feedback from the community to consider extending public API surface of the framework in the future. Thank you.This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.