Closed muchisx closed 3 weeks ago
I'm experiencing the same issue with the DateField component in Shopify's Checkout UI extensions. The selected date resets unexpectedly.
My environment:
"react": "^18.0.0"
"@shopify/ui-extensions": "2024.4.x"
"@shopify/ui-extensions-react": "2024.4.x"
We haven't made any recent changes to our code, so it's possible that a Shopify update might have caused this. Like you mentioned, since these components are part of the remote UI, they could receive updates without us being aware. Could this be related to the extension's versioning or an unintentional change on Shopify's end?
Thanks for reporting we're looking into it
I believe a fix should be shipped. Let us know if it's working again
@jun-shop working on my side! Thank you!
Please list the package(s) involved in the issue, and include the version you are using
Describe the bug
The
DateField
State handling is bugged, it resets its selection.Anyone else recently having problems with the
DateField
checkout UI component?We didn't make any changes to the code and it suddenly behaves weirdly, as a remoteUI component, I guess updates can be delivered to it without us knowing or doing anything, is it possible an update from shopify just broke it?
Seems odd too because components appear to also be linked to the Checkout UI extensions versioning? so I would expect they don't change unless we change our version
Steps to reproduce the behavior:
function Test() { const [selectedDate, setselectedDate] = useState();
console.log(selectedDate);
return <DateField label="Select a date" onChange={(value) => setselectedDate(value)} value={selectedDate} />; }