Skip to content

Commit

Permalink
docs: add label property JSDoc annotation to vaadin-item (#6919)
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan authored Dec 7, 2023
1 parent fc8ac84 commit 17bdcd8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions packages/item/src/vaadin-item.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ declare class Item extends ItemMixin(ThemableMixin(DirMixin(HTMLElement))) {
* Submittable string value. The default value is the trimmed text content of the element.
*/
value: string;

/**
* String that can be set to visually represent the selected item in `vaadin-select`.
*/
label: string | undefined;
}

declare global {
Expand Down
7 changes: 6 additions & 1 deletion packages/item/src/vaadin-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,13 @@ class Item extends ItemMixin(ThemableMixin(DirMixin(PolymerElement))) {
* Submittable string value. The default value is the trimmed text content of the element.
* @type {string}
*/
// eslint-disable-next-line no-unused-expressions
this.value;

/**
* String that can be set to visually represent the selected item in `vaadin-select`.
* @type {string}
*/
this.label;
}

/** @protected */
Expand Down

0 comments on commit 17bdcd8

Please sign in to comment.