In the following example, the Choice
details
does not render.
Tried both with a DateField
or Text
components, but both dont render.
Customer account fullpage extension:
api_version = "2025-01"
"@shopify/ui-extensions": "2025.7.1",
"@shopify/ui-extensions-react": "2025.7.1",
import {
BlockStack,
Button,
Choice,
ChoiceList,
DateField,
Form,
Modal,
Page,
Text,
} from '@shopify/ui-extensions-react/customer-account';
import { useState } from 'react';
export const Main = () => {
const [option, setOption] = useState<string>('');
const [date, setDate] = useState<string>('');
return (
<Page
title="Example"
primaryAction={
<>
<Button
overlay={
<Modal>
<Text>Current selected option: {option}</Text>
<Form
onSubmit={() => {
//
}}
>
<BlockStack spacing="base">
<ChoiceList name="reschedule" variant="base" value={option} onChange={val => setOption(val[0])}>
<Choice id="1">Option 1</Choice>
<Choice
id="2"
details={<DateField label="YYYY-MM-DD" value={date} onChange={val => setDate(val)} />}
>
Calendar
</Choice>
</ChoiceList>
</BlockStack>
</Form>
</Modal>
}
>
Active
</Button>
</>
}
>
Content
</Page>
);
};