Skip to content

Commit 130e104

Browse files
committed
fix(input, textarea): use correct id count
1 parent 592527e commit 130e104

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core/src/components/input/input.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ import { getCounterText } from './input.utils';
3333
export class Input implements ComponentInterface {
3434
private nativeInput?: HTMLInputElement;
3535
private inputId = `ion-input-${inputIds++}`;
36-
private helperTextId = `helper-text-${inputIds++}`;
37-
private errorTextId = `error-text-${inputIds++}`;
36+
private helperTextId = `${this.inputId}-helper-text`;
37+
private errorTextId = `${this.inputId}-error-text`;
3838
private inheritedAttributes: Attributes = {};
3939
private isComposing = false;
4040
private slotMutationController?: SlotMutationController;

core/src/components/textarea/textarea.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ import type { TextareaChangeEventDetail, TextareaInputEventDetail } from './text
4545
export class Textarea implements ComponentInterface {
4646
private nativeInput?: HTMLTextAreaElement;
4747
private inputId = `ion-textarea-${textareaIds++}`;
48-
private helperTextId = `helper-text-${textareaIds++}`;
49-
private errorTextId = `error-text-${textareaIds++}`;
48+
private helperTextId = `${this.inputId}-helper-text`;
49+
private errorTextId = `${this.inputId}-error-text`;
5050
/**
5151
* `true` if the textarea was cleared as a result of the user typing
5252
* with `clearOnEdit` enabled.

0 commit comments

Comments
 (0)