Skip to content

Make newAreaSelectionComponent close programmatically.  #6

Description

@lisenkaci

I am trying to set a newAreaSelectionComponent that has a popover where the user can enter some more data about the selection before saving it. The problem I am having is every time I click into the Popover it triggers a reset of the newAreaSelectionComponent. How can I programatically control reseting when the newAreaSelectionComponent is closed so losing focus does not automatically reset the selection.

         newAreaSelectionComponent={(boundingRect)=>{
                return(
                    <CustomSelectionComponent  boundingRect={boundingRect.boundingRect} selectionPageNumber={selectionPageNumber}/>
                    )
            }}


        <Popover>
                <div
                    style={{
                        ...boundingRect,
                        position: "absolute",
                        border: "1px dashed #333",
                        background: "rgba(252, 232, 151, 1)",
                        mixBlendMode: "multiply",
                    }}
                />
          </Popover>
Screen.Recording.2023-03-22.at.2.12.17.PM.mov

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions