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(activatable): add listeners for custom activators #8121

Merged
merged 4 commits into from
Aug 12, 2019

Conversation

johnleider
Copy link
Member

@johnleider johnleider commented Jul 28, 2019

Description

Add listeners to custom activators

fixes #7944
fixes #5890
fixes #5860

Motivation and Context

Custom activators were not working at all

How Has This Been Tested?

jest

Markup:

<template>
  <div class="ma-5 pa-5">
    <v-container>
      <v-btn
        id="activator-click"
        ref="act"
        color="success"
      >
        click
      </v-btn>

      <v-menu
        :activator="activator"
      >
        <v-card>
          <v-card-text>
          </v-card-text>
        </v-card>
      </v-menu>
      <div class="ma-5"></div>
      <v-btn
        id="activator-hover"
        color="error"
      >
        hover
      </v-btn>
      <v-menu
        activator="#activator-hover"
        open-on-hover
      >
        <v-card>
          <v-card-text>
          </v-card-text>
        </v-card>
      </v-menu>
    </v-container>
  </div>
</template>

<script>
  export default {
    data: () => ({
      activator: null,
    }),

    mounted () {
      this.activator = this.$refs.act
    },
  }
</script>

Types of changes

  • 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:

  • The PR title is no longer than 64 characters.
  • The PR is submitted to the correct branch (master for bug fixes and documentation updates, dev for new features and breaking changes).
  • 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)
  • I've added new examples to the kitchen (applies to new features and breaking changes in core library)

@johnleider johnleider added the T: bug Functionality that does not work as intended/expected label Jul 28, 2019
@johnleider johnleider added this to the v2.0.x milestone Jul 28, 2019
@johnleider johnleider requested a review from a team July 28, 2019 16:51
@johnleider johnleider self-assigned this Jul 28, 2019
@codecov
Copy link

codecov bot commented Jul 28, 2019

Codecov Report

Merging #8121 into master will decrease coverage by 0.21%.
The diff coverage is 90.9%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8121      +/-   ##
==========================================
- Coverage   85.76%   85.54%   -0.22%     
==========================================
  Files         334      334              
  Lines        9096     9388     +292     
  Branches     2420     2535     +115     
==========================================
+ Hits         7801     8031     +230     
- Misses       1207     1268      +61     
- Partials       88       89       +1
Impacted Files Coverage Δ
packages/vuetify/src/mixins/menuable/index.ts 91.66% <ø> (ø) ⬆️
packages/vuetify/src/components/VMenu/VMenu.ts 71.51% <100%> (+0.18%) ⬆️
packages/vuetify/src/mixins/activatable/index.ts 95.58% <90.62%> (-4.42%) ⬇️
...uetify/src/components/VCalendar/VCalendarWeekly.ts 72.72% <0%> (-6.59%) ⬇️
packages/vuetify/src/mixins/dependent/index.ts 100% <0%> (ø) ⬆️
packages/vuetify/src/services/theme/index.ts 100% <0%> (ø) ⬆️
...ges/vuetify/src/components/VCalendar/util/props.ts 100% <0%> (ø) ⬆️
packages/vuetify/src/components/VSelect/VSelect.ts 94.13% <0%> (+0.36%) ⬆️
packages/vuetify/src/components/VWindow/VWindow.ts 98.19% <0%> (+0.76%) ⬆️
packages/vuetify/src/components/VApp/VApp.ts 90% <0%> (+1.11%) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1565a8e...3a83c3d. Read the comment docs.

@dsseng dsseng self-requested a review August 1, 2019 15:29
@johnleider johnleider merged commit 3beea7c into master Aug 12, 2019
@johnleider johnleider deleted the fix/7944-activatable branch August 12, 2019 17:42
@lock lock bot locked as resolved and limited conversation to collaborators Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T: bug Functionality that does not work as intended/expected
Projects
None yet
3 participants