feat(pie-textarea): DSW-3906 Textarea Uncontrolled Usage - #3092
feat(pie-textarea): DSW-3906 Textarea Uncontrolled Usage#3092KatarinaNeskovic wants to merge 6 commits into
Conversation
🦋 Changeset detectedLatest commit: ae844f7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
5f79e82 to
f465821
Compare
|
/test-aperture |
|
Starting a new snapshot build. You can view the logs here. |
|
The build failed, please see the logs or take a look at the Workflow Tooling wiki page to make sure your PR meets the requirements. |
|
Starting a new snapshot build. You can view the logs here. |
|
An unexpected error occurred during the snapshot release process: |
|
/snapit |
|
Starting a new snapshot build. You can view the logs here. |
|
@KatarinaNeskovic Your snapshots have been published to npm! Test the snapshots by updating your Note If you have more than one of these packages installed, we suggest using the new snapshots for all of them to help avoid version conflicts. yarn up @justeattakeaway/pie-textarea@0.0.0-snapshot-release-20260804162046 --mode=update-lockfileyarn up @justeattakeaway/pie-webc@0.0.0-snapshot-release-20260804162046 --mode=update-lockfileThen finally: yarn install |
|
🚀 Aperture PR created: justeattakeaway/pie-aperture#549 App deployments will appear under the Deployments section of this PR shortly! Updated 4 Aug 2026, 16:23 UTC · PIE @ |
|
/snapit |
|
Starting a new snapshot build. You can view the logs here. |
|
@KatarinaNeskovic Your snapshots have been published to npm! Test the snapshots by updating your Note If you have more than one of these packages installed, we suggest using the new snapshots for all of them to help avoid version conflicts. yarn up @justeattakeaway/pie-textarea@0.0.0-snapshot-release-20260807093459 --mode=update-lockfileyarn up @justeattakeaway/pie-webc@0.0.0-snapshot-release-20260807093459 --mode=update-lockfileThen finally: yarn install |
| public formResetCallback (): void { | ||
| this.value = this.defaultValue ?? defaultProps.value; | ||
|
|
||
| this.value = this.defaultValue ?? ''; |
There was a problem hiding this comment.
do you think we can keep defaultProps.value but not assign it to the prop declaration on public value: TextareaProps['value']; as i see it's being used multiple times
There was a problem hiding this comment.
Hey @raoufswe I understand you'd want to avoid hardcoding, but I think in this context leaving the empty string is self explanatory and appears only in few places. I am just thinking it may be misleading to provide default to the value prop in defs.ts, if we want to purposefully keep it undefined to support uncontrolled usage. If you still think it's better practice, I totally trust your judgment - I'm happy to leave a comment to explain this is not a default for the prop :) Let me know!
…ultValue for display and form
47aab10 to
629fef0
Compare
|
/snapit |
|
Starting a new snapshot build. You can view the logs here. |
|
@KatarinaNeskovic Your snapshots have been published to npm! Test the snapshots by updating your Note If you have more than one of these packages installed, we suggest using the new snapshots for all of them to help avoid version conflicts. yarn up @justeattakeaway/pie-textarea@0.0.0-snapshot-release-20260811151859 --mode=update-lockfileyarn up @justeattakeaway/pie-webc@0.0.0-snapshot-release-20260811151859 --mode=update-lockfileThen finally: yarn install |
|
Describe your changes (can list changeset entries if preferable)
Fixes gaps in to align with native <textarea> controlled and uncontrolled behavior. Previously,
valuewas strictly required,defaultValuewas only applied on form reset and ignored on first render ifvaluewasn't passed, causing empty component to load.This PR changes make value optional, ensure proper seeding of
defaultValueon component load and correct fallback on form reset.Acceptance Criteria:
Changes were tested in Aperture and Aperture PR is here.
Author Checklist (complete before requesting a review, do not delete any)
PIE Storybook/PIE DocsPR preview./test-aperturecommand.Not-applicable Checklist items
Please move any Author checklist items that do not apply to this pull request here.
Reviewer checklists (complete before approving)
Mark items as
[-] N/Aif not applicable.Reviewer 1
PIE Storybook/PIE DocsPR preview.Reviewer 2
PIE Storybook/PIE DocsPR preview.