Skip to content

The target property is not forwarded to the Pressable component in Admin UI components #2505

Open
@stefanvermaas

Description

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

"@shopify/app": "^3.15.0"
"@shopify/cli": "^3.70.0"
"@shopify/ui-extensions": "2024.10.1"
"@shopify/ui-extensions-react": "2024.10.1"

Describe the bug

According to the docs, the Pressable component can receive a target of _self or _blank. However, in the Admin UI Extensions, the target doesn't get forwarded to the component. Therefore, the Pressable component always opens with _self even if target="_blank" is specified.

Steps to reproduce the behavior:

  1. Import the Pressable component from @shopify/ui-extensions-react/admin in an Admin UI extension.
  2. Add the target="_blank" to a Pressable component.
  3. Inspect the source code and see the target is not forwarded to the component.

Expected behavior

It should forward the target and ensure the click event opens a new window when target="_blank" is specified.

Screenshots

...

Additional context

...

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions