appendTo prop TypeScript typing disallows usage of HTML elements #2780
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
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.
The text was updated successfully, but these errors were encountered: