Skip to content

Content of popovers / dropdowns is not visible #1301

@ryanleichty

Description

@ryanleichty

Describe the bug

Content of popovers / dropdowns is not visible.

To Reproduce

Steps to reproduce the behavior:

  1. Update @sanity/ui to 2.1.8
  2. Click on any element that has a popover / dropdown menu
  3. The content of the popover / dropdown does not appear
  4. The console displays the following warning
The component Styled(Component) with the id of "sc-hMxHxi" has been created dynamically.
You may see this warning because you've called styled inside another component.
To resolve this only create new StyledComponents outside of any render method and function component. 
    at li
    at AutocompleteOption (webpack-internal:///(app-pages-browser)/./node_modules/@sanity/ui/dist/index.mjs:4697:11)
...

Expected behavior

You should see the content of the popover / dropdown.

Screenshots
If applicable, add screenshots to help explain your problem.

CleanShot 2024-05-16 at 21 51 03 2@2x

CleanShot 2024-05-16 at 21 51 13 2@2x

CleanShot 2024-05-16 at 21 51 20 2@2x

Which versions of Sanity are you using?

@sanity/cli (global) 3.41.1 (latest: 3.42.1)
@sanity/icons 2.11.8 (up to date)
@sanity/image-url 1.0.2 (up to date)
@sanity/preview-url-secret 1.6.13 (up to date)
@sanity/react-loader 1.9.19 (up to date)
@sanity/ui 2.1.8 (latest: 2.1.10)
@sanity/vision 3.42.1 (up to date)
sanity 3.42.1 (up to date)

What operating system are you using?

macOS 14.4.1 (23E224)

Which versions of Node.js / npm are you running?

10.7.0
v20.11.0

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions