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

feat(Calendar): handle default slot of CalendarCellTrigger #1086

Merged

Conversation

xollaborator
Copy link
Contributor

@xollaborator xollaborator commented Jul 1, 2024

This was started as a fix but correct fix is more like a feature.

CalendarCellTrigger is providing a slot but in case of using nested elements the logic in handleClick was failing because event.target did not have data-value to get value from. Instead od reading from DOM a value from props.day might be used which also simplifies logic.

To further improve DX for such scenario dayValue prop is added to the default scope. This will match behavior of CalendarHeading where year and month are provided.

@epr3 epr3 changed the base branch from main to 1.9 July 1, 2024 17:29
@epr3 epr3 self-requested a review July 1, 2024 17:29
Copy link
Collaborator

@epr3 epr3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏻

@zernonia zernonia merged commit fda221e into unovue:1.9 Jul 2, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants