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

OverlayEventOptions type inccorrect #4189

Closed
bu3alwa opened this issue Mar 27, 2023 · 1 comment · Fixed by #4191
Closed

OverlayEventOptions type inccorrect #4189

bu3alwa opened this issue Mar 27, 2023 · 1 comment · Fixed by #4191
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component. Typescript Issue or pull request is *only* related to TypeScript definition
Milestone

Comments

@bu3alwa
Copy link
Contributor

bu3alwa commented Mar 27, 2023

Describe the bug

Another type that's not correct. listener has type?: string which is not accurate is seems like its an object that has type and valid as fields.

/**
 * Custom overlay event options.
 */
interface OverlayEventOptions {
    /**
     * The target element to listen to.
     */
    target?: 'document' | 'window' | React.Ref<HTMLElement> | undefined;
    /**
     * The overlay element to listen to.
     */
    overlay?: 'document' | 'window' | React.Ref<HTMLElement> | undefined;
    /**
     * The event listener.
     */
    listener?(event: Event, type?: string): void;
    /**
     * Whether to listen to the event or not.
     * @defaultValue true
     */
    when?: boolean;
}

Reproducer

No response

PrimeReact version

9.2.0

React version

18.x

Language

TypeScript

Build / Runtime

Next.js

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@bu3alwa bu3alwa added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Mar 27, 2023
@melloware melloware added Typescript Issue or pull request is *only* related to TypeScript definition and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Mar 27, 2023
@melloware
Copy link
Member

PR?

bu3alwa added a commit to bu3alwa/primereact that referenced this issue Mar 27, 2023
bu3alwa added a commit to bu3alwa/primereact that referenced this issue Mar 27, 2023
bu3alwa added a commit to bu3alwa/primereact that referenced this issue Mar 27, 2023
@melloware melloware added this to the 9.2.2 milestone Mar 27, 2023
@melloware melloware linked a pull request Mar 27, 2023 that will close this issue
bu3alwa added a commit to bu3alwa/primereact that referenced this issue Mar 27, 2023
mertsincan added a commit that referenced this issue Mar 28, 2023
@mertsincan mertsincan added the Type: Bug Issue contains a defect related to a specific component. label Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component. Typescript Issue or pull request is *only* related to TypeScript definition
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants