Skip to content
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

feat(cdk/listbox): cdkOptionTypeaheadLabel should allow undefined #28464

Closed
spike-rabbit opened this issue Jan 23, 2024 · 1 comment · Fixed by #28602
Closed

feat(cdk/listbox): cdkOptionTypeaheadLabel should allow undefined #28464

spike-rabbit opened this issue Jan 23, 2024 · 1 comment · Fixed by #28602
Assignees
Labels
area: cdk/listbox P4 A relatively minor issue that is not relevant to core functions

Comments

@spike-rabbit
Copy link
Contributor

Feature Description

The input cdkOptionTypeaheadLabel of CdkOption should allow undefined as an input type

Use Case

I am using the cdkListbox internaly in a library. For this list, we allow users to provide an optional typeahead label.
When building the option I would like to write it like this:

<div [cdkOption]="value" [cdkOptionTypeaheadLabel]="optionalLabel">...</div>

However this is a compiler error. When adding an $any() cast everything works fine.

@spike-rabbit spike-rabbit added feature This issue represents a new feature or feature request rather than a bug or bug fix needs triage This issue needs to be triaged by the team labels Jan 23, 2024
@crisbeto crisbeto added P4 A relatively minor issue that is not relevant to core functions area: cdk/listbox and removed feature This issue represents a new feature or feature request rather than a bug or bug fix needs triage This issue needs to be triaged by the team labels Jan 27, 2024
@crisbeto crisbeto self-assigned this Feb 16, 2024
crisbeto added a commit to crisbeto/material2 that referenced this issue Feb 16, 2024
Allows the `cdkOptionTypeaheadLabel` to be set to a nullable value.

Fixes angular#28464.
crisbeto added a commit that referenced this issue Feb 21, 2024
Allows the `cdkOptionTypeaheadLabel` to be set to a nullable value.

Fixes #28464.
crisbeto added a commit that referenced this issue Feb 21, 2024
Allows the `cdkOptionTypeaheadLabel` to be set to a nullable value.

Fixes #28464.

(cherry picked from commit d1d1d02)
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: cdk/listbox P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants