Skip to content

Commit 9e1fb27

Browse files
committed
feat(textarea): add wrapper part
1 parent b6db94c commit 9e1fb27

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

core/api.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2526,6 +2526,7 @@ ion-textarea,part,helper-text
25262526
ion-textarea,part,label
25272527
ion-textarea,part,native
25282528
ion-textarea,part,supporting-text
2529+
ion-textarea,part,wrapper
25292530

25302531
ion-thumbnail,shadow
25312532
ion-thumbnail,prop,mode,"ios" | "md",undefined,false,false

core/src/components/textarea/textarea.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ import type { TextareaChangeEventDetail, TextareaInputEventDetail } from './text
3737
* @slot start - Content to display at the leading edge of the textarea. (EXPERIMENTAL)
3838
* @slot end - Content to display at the trailing edge of the textarea. (EXPERIMENTAL)
3939
*
40-
* @part container - The wrapper element for the textarea.
40+
* @part wrapper - The clickable label element that wraps the entire form field (label text, slots, and native textarea).
41+
* @part container - The inner wrapper element that directly contains the native textarea element.
4142
* @part label - The label text describing the textarea.
4243
* @part native - The native textarea element.
4344
* @part supporting-text - Supporting text displayed beneath the textarea label.
@@ -889,7 +890,7 @@ export class Textarea implements ComponentInterface {
889890
* interactable, clicking the label would focus that instead
890891
* since it comes before the textarea in the DOM.
891892
*/}
892-
<label class="textarea-wrapper" htmlFor={inputId} onClick={this.onLabelClick}>
893+
<label class="textarea-wrapper" htmlFor={inputId} onClick={this.onLabelClick} part="wrapper">
893894
{this.renderLabelContainer()}
894895
<div class="textarea-wrapper-inner">
895896
{

0 commit comments

Comments
 (0)