diff --git a/api-generator/components/overlaypanel.js b/api-generator/components/overlaypanel.js index b71692020..eeb74c637 100644 --- a/api-generator/components/overlaypanel.js +++ b/api-generator/components/overlaypanel.js @@ -76,6 +76,10 @@ const OverlayPanelEvents = [ { name: 'hide', description: 'Callback to invoke before the overlay is hidden.' + }, + { + name: 'container', + description: 'Custom container template.' } ]; diff --git a/components/lib/overlaypanel/OverlayPanel.d.ts b/components/lib/overlaypanel/OverlayPanel.d.ts index b7ce6c8cf..17b271679 100755 --- a/components/lib/overlaypanel/OverlayPanel.d.ts +++ b/components/lib/overlaypanel/OverlayPanel.d.ts @@ -191,6 +191,21 @@ export interface OverlayPanelEmits { * Callback to invoke when the overlay is hidden. */ hide(): void; + /** + * Custom container slot. + * @param {Object} scope - container slot's params. + */ + container(scope: { + /** + * Close overlay panel function. + */ + onClose: () => void; + /** + * Close button keydown function. + * @param {Event} event - Browser event + */ + onKeydown: (event: Event) => void; + }): VNode[]; } /** diff --git a/components/lib/overlaypanel/OverlayPanel.vue b/components/lib/overlaypanel/OverlayPanel.vue index 97dadcef5..1dd4a2789 100755 --- a/components/lib/overlaypanel/OverlayPanel.vue +++ b/components/lib/overlaypanel/OverlayPanel.vue @@ -2,14 +2,17 @@
-
- -
- + +