GithubHelp home page GithubHelp logo

Comments (3)

mikeerickson avatar mikeerickson commented on May 31, 2024 2

Hey John

I have tried this and it works as expected. However, if I add the class to the component scoped style which shows the menu, it does not work correctly. If I move the display class to global css, it works.

Not a big deal as I have a working solution, but figured I would pass it along :-)

from vue-simple-context-menu.

johndatserakis avatar johndatserakis commented on May 31, 2024 1

Hey Mike,

Ok I see what you're looking for here - and I think there's kinda already a pretty simple way for you to accomplish this - not sure if it's really worth adding as a new parameter. Let me know what you think.

What you can do now is use the class property option on the option you'd like disabled. Something like this:

{
  name: "New Contact",
  slug: "new-contact",
  class: "disabled-option"
},
{
  name: "New Company",
  slug: "new-company",
}

And then in your CSS have:

.disabled-option {
  color: #eee;
  pointer-events: none;
}

Now the user will not be able to click that option, and by adjusting the color it will appear greyed out. Does that solve it?

from vue-simple-context-menu.

mikeerickson avatar mikeerickson commented on May 31, 2024 1

Hey John

This is totally acceptable to me 👍

I was not aware of the class property

from vue-simple-context-menu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.