Skip to content

Commit d1d1d02

Browse files
authored
fix(cdk/listbox): make typeahead label nullable (#28602)
Allows the `cdkOptionTypeaheadLabel` to be set to a nullable value. Fixes #28464.
1 parent facd027 commit d1d1d02

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cdk/listbox/listbox.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export class CdkOption<T = unknown> implements ListKeyManagerOption, Highlightab
113113
* The text used to locate this item during listbox typeahead. If not specified,
114114
* the `textContent` of the item will be used.
115115
*/
116-
@Input('cdkOptionTypeaheadLabel') typeaheadLabel: string;
116+
@Input('cdkOptionTypeaheadLabel') typeaheadLabel: string | null;
117117

118118
/** Whether this option is disabled. */
119119
@Input({alias: 'cdkOptionDisabled', transform: booleanAttribute})

tools/public_api_guard/cdk/listbox.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export class CdkOption<T = unknown> implements ListKeyManagerOption, Highlightab
127127
setActiveStyles(): void;
128128
setInactiveStyles(): void;
129129
toggle(): void;
130-
typeaheadLabel: string;
130+
typeaheadLabel: string | null;
131131
value: T;
132132
// (undocumented)
133133
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkOption<any>, "[cdkOption]", ["cdkOption"], { "id": { "alias": "id"; "required": false; }; "value": { "alias": "cdkOption"; "required": false; }; "typeaheadLabel": { "alias": "cdkOptionTypeaheadLabel"; "required": false; }; "disabled": { "alias": "cdkOptionDisabled"; "required": false; }; "enabledTabIndex": { "alias": "tabindex"; "required": false; }; }, {}, never, never, true, never>;

0 commit comments

Comments
 (0)