Code Monkey home page Code Monkey logo

Comments (5)

JBtje avatar JBtje commented on June 9, 2024

Note: why isn't is-visible a prop?

<tab name="Invissible tab" v-if="tabXvisible">
...
</tab>
export default {
    data() {
        return{
            tabXvisible = false,
        }
    }
}

or you can do it programically:

this.$children[0].findTab('#advice').isVisible = false

but that is not the way vue is intended to work...

from vue-tabs-component.

manelclos avatar manelclos commented on June 9, 2024

Hi @ian-pinto-vamaship,

You can watch the variable to automate it, reusing @JBtje data ():

<tabs ref="tabs">
  ...
</tabs>
  ...
  watch: {
    tabXvisible: function (val) {
      this.$refs.tabs.setTabVisible(this.tabXHash, val)
    }
  }
  ...

@JBtje I see no reason why isVisible could not be a property, PR? :)

from vue-tabs-component.

JBtje avatar JBtje commented on June 9, 2024

@manelclos PR is only useful if the project owner accepts them.... Seems that's not the case for this project. (my PR is still not accepted)

from vue-tabs-component.

manelclos avatar manelclos commented on June 9, 2024

@JBtje as you can see here #67 (comment) you just need to be patient

from vue-tabs-component.

sebastiandedeyne avatar sebastiandedeyne commented on June 9, 2024

The visibility method was added to work a round a specific case (see #16).

In hindsight, it should have been done differently, but we don't really want to support any new configuration at the moment, so we're going to stick with the existing API.

We'll revisit this problem in a future major version of this package.

from vue-tabs-component.

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.