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

4.0.0 has a typescript error #106

Closed
OliverDudgeon opened this issue Jul 2, 2022 · 2 comments
Closed

4.0.0 has a typescript error #106

OliverDudgeon opened this issue Jul 2, 2022 · 2 comments
Labels

Comments

@OliverDudgeon
Copy link

After updating to 4.0.0, this now has a ts error for me.

const popupState = usePopupState({ variant: "popover", popupId: `add-label-${datasetId}` });

return (
<Popover
        sx={{ "& .MuiPopover-paper": { p: 1 } }}
        {...bindPopover(popupState)}
        anchorOrigin={{ vertical: "top", horizontal: "center" }}
        transformOrigin={{ vertical: "bottom", horizontal: "center" }}
      ></Popover>
)

Specifically,

Type '{ children: Element; anchorOrigin: { vertical: "top"; horizontal: "center"; }; transformOrigin: { vertical: "bottom"; horizontal: "center"; }; id: string | undefined; anchorEl: HTMLElement | undefined; ... 8 more ...; sx: { ...; }; }' is not assignable to type 'PopoverProps'.
  Types of property 'anchorPosition' are incompatible.
    Type 'AnchorPosition | null | undefined' is not assignable to type 'PopoverPosition | undefined'.
      Type 'null' is not assignable to type 'PopoverPosition | undefined'.ts(2322)
@jedwards1211
Copy link
Member

sorry about that! CI will release a fix will be released in a moment

@jedwards1211
Copy link
Member

🎉 This issue has been resolved in version 4.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants