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

fix(VCalendar): add nativeEvent to all re-emitted events #14307

Merged
merged 12 commits into from
Nov 30, 2021

Conversation

Meplos
Copy link
Contributor

@Meplos Meplos commented Oct 22, 2021

Description

Fixes #9485
This PR allow calendar event emit the native event (MouseEvent, etc...) in :time and :date custom event.
Before native event was pass only on the :event event.

Motivation and Context

This change is require for all features which need raw event information. Like open a context menu at the click position.

Fix issue issue #14298.

How Has This Been Tested?

Test with log information. In fact this PR don't affect beheavior of the VCalendar, just add information.

Markup:

<template>
  <v-container>
    <!--  -->
    <v-calendar
      type="day"
      @contextmenu:time="log('CONTEXT TIME', $event)"
      @click:time="log('CLICK TIME', $event)"
    ></v-calendar>
    <v-calendar
      type="week"
      @contextmenu:time="log('CONTEXT TIME', $event)"
      @click:time="log('CLICK TIME', $event)"
    ></v-calendar>
    <v-calendar
      type="month"
      @contextmenu:day="log('CONTEXT DAY', $event)"
      @click:day="log('CLICK DAY', $event)"
    ></v-calendar>

  </v-container>
</template>

<script>
  export default {
    data: () => ({
    //
    }),
    methods: {
      log (msg, event) {
        console.log(msg, event)
      },
    },
  }
</script>

Types of changes

  • [ x ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement/refactoring (non-breaking change that doesn't add any features but makes things better)

Checklist:

  • [ x ] The PR title is no longer than 64 characters.
  • [ x ] The PR is submitted to the correct branch (master for bug fixes and documentation updates, dev for new features and backwards compatible changes and next for non-backwards compatible changes).
  • [ x ] My code follows the code style of this project.
  • I've added relevant changes to the documentation (applies to new features and breaking changes in core library)

ghost
ghost previously approved these changes Oct 23, 2021
@glen-84 glen-84 added C: VCalendar VCalendar T: bug Functionality that does not work as intended/expected labels Oct 24, 2021
@KaelWD KaelWD added the S: has merge conflicts The pending Pull Request has merge conflicts label Oct 31, 2021
@KaelWD
Copy link
Member

KaelWD commented Nov 3, 2021

@Meplos There are more events missing: #9485

@Meplos
Copy link
Contributor Author

Meplos commented Nov 3, 2021

Ok, @KaelWD I will work on this in the next days.

@KaelWD KaelWD removed the S: has merge conflicts The pending Pull Request has merge conflicts label Nov 3, 2021
@KaelWD KaelWD changed the title fix(VCalendar): add native event on :time and :date event fix(VCalendar): add nativeEvent to all re-emitted events Nov 30, 2021
@KaelWD KaelWD merged commit bb78e4e into vuetifyjs:master Nov 30, 2021
@Meplos Meplos deleted the fix/14298-VCalendarEvent branch November 30, 2021 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VCalendar VCalendar T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report] Unable to use native event in v-calendar in @click:more event
3 participants