Skip to content

docs(input, input-number, input-text): api consistency across components #6634

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

Merged
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
4 changes: 2 additions & 2 deletions src/components/input-number/input-number.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export class InputNumber
@Prop({ reflect: true }) alignment: Position = "start";

/**
* When `true`, the component is focused on page load.
* When `true`, the component is focused on page load. Only one element can contain `autofocus`. If multiple elements have `autofocus`, the first element will receive focus.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

*
* @mdn [autofocus](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus)
*/
Expand Down Expand Up @@ -495,7 +495,7 @@ export class InputNumber
this.childNumberEl?.focus();
}

/** Selects all text of the component's `value`. */
/** Selects the text of the component's `value`. */
@Method()
async selectText(): Promise<void> {
this.childNumberEl?.select();
Expand Down
4 changes: 2 additions & 2 deletions src/components/input-text/input-text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class InputText
@Prop({ reflect: true }) alignment: Position = "start";

/**
* When `true`, the component is focused on page load.
* When `true`, the component is focused on page load. Only one element can contain `autofocus`. If multiple elements have `autofocus`, the first element will receive focus.
*
* @mdn [autofocus](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus)
*/
Expand Down Expand Up @@ -389,7 +389,7 @@ export class InputText
this.childEl?.focus();
}

/** Selects all text of the component's `value`. */
/** Selects the text of the component's `value`. */
@Method()
async selectText(): Promise<void> {
this.childEl?.select();
Expand Down
4 changes: 2 additions & 2 deletions src/components/input/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export class Input
@Prop({ reflect: true }) alignment: Position = "start";

/**
* When `true`, the component is focused on page load.
* When `true`, the component is focused on page load. Only one element can contain `autofocus`. If multiple elements have `autofocus`, the first element will receive focus.
*
* @mdn [autofocus](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus)
*/
Expand Down Expand Up @@ -564,7 +564,7 @@ export class Input
}
}

/** Selects all text of the component's `value`. */
/** Selects the text of the component's `value`. */
@Method()
async selectText(): Promise<void> {
if (this.type === "number") {
Expand Down