Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add label property JSDoc annotation to vaadin-item (#6919) (CP: 23.3) #6923

Merged
merged 2 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
9 changes: 7 additions & 2 deletions packages/item/src/vaadin-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,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;
this.value; // eslint-disable-line no-unused-expressions

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

/** @protected */
Expand Down