Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

marker-tooltip slot returns single object instead of array #959

Closed
xSimekj1 opened this issue Aug 1, 2024 · 0 comments
Closed

marker-tooltip slot returns single object instead of array #959

xSimekj1 opened this issue Aug 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@xSimekj1
Copy link

xSimekj1 commented Aug 1, 2024

Describe the bug

When customizing tooltips via #marker-tooltip slot, there are two props available: tooltip and day. The issue is that tooltip is not an array as expected but is provided one by one. So, instead of Tooltip[], we get just Tooltip, causing TypeScript to report errors when trying to work with the data.
This issue does not occur in the #marker slot.

Steps to reproduce the behavior:

  1. Recreate https://vue3datepicker.com/slots/content/#marker-tooltip example
  2. Try to use #marker-tooltip slot with tooltip data and check tooltip isArray
  3. Alternatively, check the StackBlitz example: https://stackblitz.com/edit/vuepic-vue-datepicker-mwn8fd?file=src%2Fcomponents%2FPlayground.vue

Expected behavior

Either the return type of slot should be just a single Tooltip object or it should return an array Tooltip[] as TypeScript expects.
According to docs it should be also array tooltip - The tooltip data provided in the array

Screenshots

Typescript expects array of tooltips
Typescript expects array of Tooltips

image
Single Tooltip returned instead

@xSimekj1 xSimekj1 added awaiting triage The issue is not reviewed by the maintainers bug Something isn't working labels Aug 1, 2024
@Jasenkoo Jasenkoo removed the awaiting triage The issue is not reviewed by the maintainers label Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants