Fixed #6504 - CascadeSelect: new header and footer slots

pull/6275/head^2
tugcekucukoglu 2024-10-01 12:43:38 +03:00
parent 920765f171
commit 58a750d656
2 changed files with 10 additions and 0 deletions

View File

@ -502,6 +502,14 @@ export interface CascadeSelectSlots {
*/
class: string;
}): VNode[];
/**
* Custom header template.
*/
header(): VNode[];
/**
* Custom footer template.
*/
footer(): VNode[];
}
/**

View File

@ -53,6 +53,7 @@
@keydown="onOverlayKeyDown"
v-bind="{ ...panelProps, ...overlayProps, ...ptm('overlay') }"
>
<slot name="header" />
<div :class="cx('listContainer')" v-bind="ptm('listContainer')">
<CascadeSelectSub
:id="id + '_tree'"
@ -79,6 +80,7 @@
<span role="status" aria-live="polite" class="p-hidden-accessible" v-bind="ptm('hiddenSelectedMessage')" :data-p-hidden-accessible="true">
{{ selectedMessageText }}
</span>
<slot name="footer" />
</div>
</transition>
</Portal>