Skip to content

Commit 5917492

Browse files
Copilotmfranzkemichaelmkrauscopilot-swe-agent[bot]
authored
feat: add date input reset to React showcase (#5499)
* docs: adapted solution * fix(input[type="date"]): resetting a field by the empty string * Create orange-eyes-pump.md * Clarify behavior of DBInput with empty string input * Initial plan * feat: add date input reset to React showcase form Co-authored-by: mfranzke <[email protected]> * fix: add value prop to date input for controlled component Co-authored-by: mfranzke <[email protected]> --------- Co-authored-by: Maximilian Franzke <[email protected]> Co-authored-by: Maximilian Franzke <[email protected]> Co-authored-by: Michael Kraus <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]>
1 parent f773e02 commit 5917492

File tree

1 file changed

+2
-0
lines changed
  • showcases/react-showcase/src/components/form

1 file changed

+2
-0
lines changed

showcases/react-showcase/src/components/form/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ const FormComponent = () => {
118118
label="Date input"
119119
message="Description"
120120
name="input-date-name"
121+
value={dateinput}
121122
onChange={(event) => {
122123
setDateinput(event.target.value);
123124
}}
@@ -254,6 +255,7 @@ const FormComponent = () => {
254255
type="button"
255256
onClick={() => {
256257
setInput('reset');
258+
setDateinput('');
257259
}}>
258260
Reset and Toggle
259261
</DBButton>

0 commit comments

Comments
 (0)