Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

customer account ui extensions: unable to close datepicker inside modal #2422

Open
mateusvahl opened this issue Oct 18, 2024 · 3 comments
Open
Labels
bug Something isn't working Checkout UI Components This issue is related to the Checkout UI component library Customer account UI extensions

Comments

@mateusvahl
Copy link

Please list the package(s) involved in the issue, and include the version you are using

"@shopify/ui-extensions": "2024.10.0",
"@shopify/ui-extensions-react": "2024.10.0",

Describe the bug

Unable to close datepicker popup:

  1. In the following structuring, click in More actions, then Reschedule
  2. Click in the calendar icon and pick a date

Issues:
1 ) Clicking in the modal does not closes the date picker
2) Clicking outside(overlay), causes the modal to close

Steps to reproduce the behavior:

export const Demo = () => {
  const [value, setValue] = useState('2024-11-20');
  return (
    <Page
      title="Order"
      primaryAction={
        <>
          <Button>Action</Button>
          <Button>Action</Button>
          <Button
            overlay={
              <Modal padding>
                <DateField label="YYYY-MM-DD" value={value} onChange={date => setValue(date)} />
              </Modal>
            }
          >
            Reschedule
          </Button>
        </>
      }
    />
  );
};

The same does not happen, if you only have a single primaryAction 🙇‍♂️:
( But clicking outside the datepicker still closes the modal 😥)

export const Demo = () => {
  const [value, setValue] = useState('2024-11-20');
  return (
    <Page
      title="Order"
      primaryAction={
        <Button
          overlay={
            <Modal padding>
              <DateField label="YYYY-MM-DD" value={value} onChange={date => setValue(date)} />
            </Modal>
          }
        >
          Reschedule
        </Button>
      }
    />
  );
};

Screenshots

Screen.Recording.2024-10-18.at.15.04.42.mov
@mateusvahl mateusvahl added the bug Something isn't working label Oct 18, 2024
@jun-shop jun-shop added the Checkout UI Components This issue is related to the Checkout UI component library label Oct 23, 2024
@mateusvahl
Copy link
Author

This seems to be fixed.

Thank you!

@mateusvahl
Copy link
Author

Re-opening this, it seems to be happening again.

@mateusvahl
Copy link
Author

This is a issue only when the modal is under a <Page primaryAction={...button with modal & data picker...} />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Checkout UI Components This issue is related to the Checkout UI component library Customer account UI extensions
Projects
None yet
Development

No branches or pull requests

3 participants