Skip to content

how to override the method PrimeReact uses to position the overlay  #6819

Open
@T005206

Description

@T005206

Describe the bug

Hello, I am developing a map using the ReactFlow library. This library uses a div where it renders the map. It is possible to pan and zoom on the map, but it does so with CSS transformations. I am using PrimeReact's OverlayPanel, but I have encountered a problem. If the appendTo of the overlay is set to "self", it moves correctly with the map and applies the same zoom as the map since it is contained within a div to which the CSS transformation is applied. The problem is that it does not position correctly on the element that opens it. Is there any way to override the method PrimeReact uses to position the overlay and take into account the transformation of the parent container? Or, on the other hand, how could I position the element correctly if the container has a transformation? If the appendTo is set to the default, it positions correctly but becomes disconnected when panning or zooming the map.

Reproducer

No response

PrimeReact version

10

React version

17.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionIssue contains a question about the use of PrimeReact components or the products it supports

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions