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

[Feature Request] Allow menu to be not openable without disabling activator's functionality #5472

Closed
jacekkarczmarczyk opened this issue Oct 29, 2018 · 1 comment
Assignees
Labels
S: has PR The issue has a pending Pull Request T: feature A new feature

Comments

@jacekkarczmarczyk
Copy link
Member

jacekkarczmarczyk commented Oct 29, 2018

Problem to solve

Currently if the menu needs to be opened conditionally you need to duplicate the activator's markup for the case when menu should not be openable:

<v-menu v-if="menuShouldOpenOnClick">
  <foo slot="activator"></foo>
  <bar></bar>
</v-menu>
<foo v-else></foo>

In the example below the menu doesn't open when it's disabled but also the button loses it's functionality
https://codepen.io/anon/pen/WaWXeL?editors=1000

Proposed solution

Either add a new prop to control this behaviour or change the behaviour of the disabled prop so that disabled menu doesn't open when the activator is clicked without disabling activator's functionality

@KaelWD
Copy link
Member

KaelWD commented Nov 1, 2018

Remove pointer-events: none, and just ignore the click instead.

I'd be fine with doing this in a minor release unless anyone objects too hard.

@johnleider johnleider added S: has PR The issue has a pending Pull Request and removed S: work in progress labels Nov 2, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
S: has PR The issue has a pending Pull Request T: feature A new feature
Projects
None yet
Development

No branches or pull requests

3 participants