Skip to content

Commit

Permalink
feat: Add menu-header slot (resolves #935)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasenkoo committed Jul 14, 2024
1 parent ed668bf commit 0d15d39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/VueDatePicker/components/DatepickerMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<span class="dp--menu-loader"></span>
</div>
</div>
<div v-if="$slots['menu-header']" class="dp--menu-header"><slot name="menu-header" /></div>
<div v-if="!defaultedInline.enabled && !teleportCenter" :class="arrowClass"></div>
<div
ref="innerMenuRef"
Expand Down
1 change: 1 addition & 0 deletions src/VueDatePicker/composables/slots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export const slots = [
{ name: 'top-extra', use: ['shared', 'month-year'] },
{ name: 'tp-inline-arrow-up', use: ['shared', 'time'] },
{ name: 'tp-inline-arrow-down', use: ['shared', 'time'] },
{ name: 'menu-header', use: ['menu'] },
];

export const inputSlots = [{ name: 'trigger' }, { name: 'input-icon' }, { name: 'clear-icon' }, { name: 'dp-input' }];
Expand Down

0 comments on commit 0d15d39

Please sign in to comment.