-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(cdk-experimental/radio): create radio group and button directives #31050
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
base: main
Are you sure you want to change the base?
Conversation
* </div> | ||
* ``` | ||
*/ | ||
@Directive({ |
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.
should this have some tests?
private readonly _cdkRadioButtons = contentChildren(CdkRadioButton, {descendants: true}); | ||
|
||
/** A signal wrapper for directionality. */ | ||
protected textDirection = toSignal(this._directionality.change, { |
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.
can this just be textDirection = inject(Directionality).valueSignal
?
orientation = input<'vertical' | 'horizontal'>('vertical'); | ||
|
||
/** Whether focus should wrap when navigating. */ | ||
wrap = input(false, {transform: booleanAttribute}); // Radio groups typically don't wrap |
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.
given the comment should this be an input
? or just hardcoded to false
private _isViewInitialized = signal(false); | ||
|
||
constructor() { | ||
effect(() => { |
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.
could this just be afterRenderEffect
and you skip the ngAfterViewInit
stuff?
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.
I'm just now learning about afterRenderEffect
but that sounds exactly like what we want haha
No description provided.