Skip to content

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

Closed
@spike-rabbit

Description

@spike-rabbit

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.

Metadata

Metadata

Assignees

Labels

P4A relatively minor issue that is not relevant to core functionsarea: cdk/listbox

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions