Skip to content

Commit f62eafa

Browse files
Artur-claude
andcommitted
feat: add TypeScript definitions for itemLabelGenerator
- Add itemLabelGenerator type definition to SelectBaseMixinClass - Add itemLabelGenerator type definition to ComboBoxItemsMixinClass - MultiSelectComboBoxMixinClass inherits the type automatically via ComboBoxItemsMixinClass 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 8a60ed6 commit f62eafa

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

packages/combo-box/src/vaadin-combo-box-items-mixin.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,11 @@ export declare class ComboBoxItemsMixinClass<TItem> {
5050
* @attr {string} item-value-path
5151
*/
5252
itemValuePath: string;
53+
54+
/**
55+
* Function that is used to generate the label for each item.
56+
* Receives one argument:
57+
* - `item` The item to generate the label for.
58+
*/
59+
itemLabelGenerator: ((item: TItem) => string) | undefined;
5360
}

packages/select/src/vaadin-select-base-mixin.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ export declare class SelectBaseMixinClass {
107107
*/
108108
noVerticalOverlap: boolean;
109109

110+
/**
111+
* Function that is used to generate the label for each item.
112+
* Receives one argument:
113+
* - `item` The item to generate the label for.
114+
*/
115+
itemLabelGenerator: ((item: SelectItem) => string) | undefined;
116+
110117
/**
111118
* Requests an update for the content of the select.
112119
* While performing the update, it invokes the renderer passed in the `renderer` property.

0 commit comments

Comments
 (0)