Skip to content

Commit

Permalink
Fixed #6504 - CascadeSelect: new header and footer slots
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Oct 1, 2024
1 parent 920765f commit 58a750d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/primevue/src/cascadeselect/CascadeSelect.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,14 @@ export interface CascadeSelectSlots {
*/
class: string;
}): VNode[];
/**
* Custom header template.
*/
header(): VNode[];
/**
* Custom footer template.
*/
footer(): VNode[];
}

/**
Expand Down
2 changes: 2 additions & 0 deletions packages/primevue/src/cascadeselect/CascadeSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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'"
Expand All @@ -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>
Expand Down

0 comments on commit 58a750d

Please sign in to comment.