Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 21, 2025

Addresses feedback from #5440 to demonstrate empty string reset for date inputs across all framework showcases.

Changes

React showcase (showcases/react-showcase/src/components/form/index.tsx):

  • Added value={dateinput} prop to date input (line 121) - converts from uncontrolled to controlled component
  • Added setDateinput('') to reset button handler (line 258)

Vue showcase - already implements date input reset at line 60

// Before: uncontrolled date input
<DBInput
  type="date"
  onChange={(event) => setDateinput(event.target.value)}
/>

// After: controlled date input with reset capability
<DBInput
  type="date"
  value={dateinput}
  onChange={(event) => setDateinput(event.target.value)}
/>

// Reset button now clears both text and date inputs
<DBButton onClick={() => {
  setInput('reset');
  setDateinput('');  // ← added
}}>

Aligns React showcase with Angular showcase pattern where form.get('dateinput')?.setValue('') resets date fields.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

🔭🐙🐈 Test this branch here: https://design-system.deutschebahn.com/core-web/review/copilot/sub-pr-5440-again

@changeset-bot
Copy link

changeset-bot bot commented Nov 21, 2025

⚠️ No Changeset found

Latest commit: a2eab10

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

copilot-swe-agent[bot] and others added 2 commits November 21, 2025 10:58
Co-authored-by: mfranzke <787658+mfranzke@users.noreply.github.com>
Co-authored-by: mfranzke <787658+mfranzke@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on empty string reset for date form fields feat: add date input reset to React showcase Nov 21, 2025
Copilot AI requested a review from mfranzke November 21, 2025 11:03
Base automatically changed from 5439-dbinput-inserting-an-empty-string-doesnt-empty-date-form-fields to main November 26, 2025 17:44
@mfranzke mfranzke marked this pull request as ready for review November 27, 2025 05:55
@github-actions github-actions bot added the 📺showcases Changes to 1-n showcases label Nov 27, 2025
@mfranzke mfranzke merged commit 5917492 into main Nov 27, 2025
72 checks passed
@mfranzke mfranzke deleted the copilot/sub-pr-5440-again branch November 27, 2025 09:43
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in UX Engineering Team Backlog Nov 27, 2025
@mfranzke mfranzke changed the title feat: add date input reset to React showcase docs: add date input reset to React showcase Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📺showcases Changes to 1-n showcases

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants