Skip to content

Commit

Permalink
fix(cdk/listbox): make typeahead label nullable (#28602)
Browse files Browse the repository at this point in the history
Allows the `cdkOptionTypeaheadLabel` to be set to a nullable value.

Fixes #28464.
  • Loading branch information
crisbeto authored Feb 21, 2024
1 parent facd027 commit d1d1d02
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cdk/listbox/listbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export class CdkOption<T = unknown> implements ListKeyManagerOption, Highlightab
* The text used to locate this item during listbox typeahead. If not specified,
* the `textContent` of the item will be used.
*/
@Input('cdkOptionTypeaheadLabel') typeaheadLabel: string;
@Input('cdkOptionTypeaheadLabel') typeaheadLabel: string | null;

/** Whether this option is disabled. */
@Input({alias: 'cdkOptionDisabled', transform: booleanAttribute})
Expand Down
2 changes: 1 addition & 1 deletion tools/public_api_guard/cdk/listbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export class CdkOption<T = unknown> implements ListKeyManagerOption, Highlightab
setActiveStyles(): void;
setInactiveStyles(): void;
toggle(): void;
typeaheadLabel: string;
typeaheadLabel: string | null;
value: T;
// (undocumented)
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>;
Expand Down

0 comments on commit d1d1d02

Please sign in to comment.