Giter Site home page Giter Site logo

Comments (3)

AustinGil avatar AustinGil commented on July 27, 2024 1

Hey, PRs are always welcome. It will help me better understand what you're suggesting. I think you make some valid points, and I cant think of many reasons to keep it as it currently is.

However, rather than adding a class, I think a good approach is to replace the current implementation using v-if to v-show

from vuetensils.

AustinGil avatar AustinGil commented on July 27, 2024

Yeah, thanks. That's not a bad idea, but I would like to hear a bit more about your arguments for using a hidden class rather than removing it from the DOM.

from vuetensils.

nyambe avatar nyambe commented on July 27, 2024

Yeah, thanks. That's not a bad idea, but I would like to hear a bit more about your arguments for using a hidden class rather than removing it from the DOM.

In my case there are 2 main reasons, but I can think of many more.

  1. NUXT. I am using nuxt. Dropdown items (links) need to be available for crawler and SEO reasons.
  2. The dropdown shows States (button) and cities (content and link). There is a hiccup when changing states, to much data I guess.

I already did the modification, it took me less than 5 minutes. I would take another 15 minutes to make an option. Just need to tie the actions to methods. When the css-only option is set to true then all you need to do is set isHover and isFocus to true (the class still changes)

As a side note, I gained @click to open dropdown and an open all default setting. Very handy (reasons 3&4)

on vts-dropdown
@mouseenter="onHover"
@mouseleave="onHover"
@focusout="onFocusout"

On button
@click="buttonClick"

added class to _content
${!isCssOnly ? 'hidden' : '' }

Really really simple
I can do a pull request if you like it.

Keep up the good work

from vuetensils.

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.