Code Monkey home page Code Monkey logo

Comments (7)

cristijora avatar cristijora commented on May 19, 2024 3

Yes @theKhorshed that can be an option. Another more generic option would be this one

var tabs = this.$refs.wizard.tabs;
tabs.forEach((tab)=>tab.checked = true)
this.$refs.wizard.maxStep = tabs.length;

https://jsfiddle.net/bt5dhqtf/1278/

from vue-form-wizard.

pimboden avatar pimboden commented on May 19, 2024

I think this should not be part of a wizard... If you need that, then you should use normal tab control... see the vue-tabs from @cristijora ... A wizard, in my opinion,should guide you forward, step by step.
I mean, if @cristijora is implementing this, then it'll need to be configurable... because for my use case it would be actually wrong if the user can click any the step.

from vue-form-wizard.

cristijora avatar cristijora commented on May 19, 2024

@pimboden thanks for the answer. I wanted to write the same thing.
Although I agree with this, maybe there are use cases where you want to show a wizard for informational purposes.
This behavior @theKhorshed can be achieved with scoped slots and some custom logic but I wouldnt include it as a prop/option in the wizard as its not a default expected behavior as @pimboden said

from vue-form-wizard.

theKhorshed avatar theKhorshed commented on May 19, 2024

Thanks for your reply and you guys are right.

Actually, I need this the default wizard behavior when a user submits the form for the first time and also the tab like behavior when the users come back to edit the form later.

I'm doing this right now via the following code on mount

this.$refs.wizard.changeTab(0, 3)
this.$refs.wizard.changeTab(3, 0)

Let me know if there is any better approach. Also I think a prop/option would be a nice addition to the component.

from vue-form-wizard.

theKhorshed avatar theKhorshed commented on May 19, 2024

Thanks a lot @cristijora

from vue-form-wizard.

yogithesymbian avatar yogithesymbian commented on May 19, 2024

Yes @theKhorshed that can be an option. Another more generic option would be this one

var tabs = this.$refs.wizard.tabs;
tabs.forEach((tab)=>tab.checked = true)
this.$refs.wizard.maxStep = tabs.length;

https://jsfiddle.net/bt5dhqtf/1278/

greats!...

from vue-form-wizard.

yogithesymbian avatar yogithesymbian commented on May 19, 2024

on documentation we can do like these

this.$refs.wizardFirst.activateAll()

from vue-form-wizard.

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.