-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
Description
Raycast version: v1.25.7
Description
Both Form.DatePicker and Form.Dropdown should reset to their initial state if we change back their value prop to undefined, but it is not working as expected
Steps To Reproduce
- Use this simple test form code:
export default function TestForm() {
const [date, setDate] = useState();
return (
<Form>
<Form.DatePicker
id="date"
title="Date"
value={date}
onChange={(val) => {
setDate(val);
setTimeout(() => setDate(undefined), 2000);
}}
/>
</Form>
);
}
- Render it and change the Date input to any value
The current behavior
The input will keep displaying the first selected value
The expected behavior
it should reset (ie, "No Date") after 2 seconds
Reactions are currently unavailable