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

appendTo prop TypeScript typing disallows usage of HTML elements #2780

Closed
danielshawellis opened this issue Jul 17, 2022 · 0 comments
Closed
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@danielshawellis
Copy link

Describe the bug

The documentation for the OverlayPanel describes the appendTo prop as "A valid query selector or an HTMLElement to specify where the overlay gets attached." However, in the type declaration for this component, the OverlayPanelAppendToType is defined as 'body' | 'self' | string | undefined. Either this declaration should be changed to 'body' | 'self' | string | undefined | HTMLElement or the documentation should be corrected.

Reproducer

https://codesandbox.io/s/focused-matsumoto-srzukt?file=/src/App.vue

PrimeVue version

3.15.0

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

Attempt to use a reference to an HTMLElment in the appendTo prop of the OverlayPanel element.

Expected behavior

The OverlayPanel element should not trigger type errors when an HTMLElement is passed into it via the appendTo prop.

@danielshawellis danielshawellis added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Jul 17, 2022
@tugcekucukoglu tugcekucukoglu changed the title Component: OverlayPanel -- appendTo prop typing disallows HTML elements appendTo prop TypeScript typing disallows usage of HTML elements Jul 18, 2022
@tugcekucukoglu tugcekucukoglu added this to the 3.15.1 milestone Jul 18, 2022
@tugcekucukoglu tugcekucukoglu self-assigned this Jul 18, 2022
tugcekucukoglu added a commit that referenced this issue Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants