Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Tabs added programmatically wrong order #247

Open
matteopolati opened this issue May 28, 2018 · 7 comments
Open

Tabs added programmatically wrong order #247

matteopolati opened this issue May 28, 2018 · 7 comments

Comments

@matteopolati
Copy link

Hi, in my app i add tabs from web service through axios but tabs navigation order not respect the html generated order.
Any suggestions?

Thanx

@mdjaman
Copy link

mdjaman commented Nov 9, 2018

Same issue. Any updates? Did you solve it? If so could you please share how u handle it

@matteopolati
Copy link
Author

Unfortunately not..

@dany-eudes
Copy link

Maybe this issue. See: #229

@mdjaman
Copy link

mdjaman commented Dec 3, 2018

Sure sorry i didn't post update. I successfully managed it, works great now

@dany-eudes
Copy link

@mdjaman, could you please explain your solution? That would help others. Thanks!

@mdjaman
Copy link

mdjaman commented Dec 6, 2018

Sure but no real magic applied; i couldn't explain but one thing i did wrong is use a subcomponent as tabcontent. So wrap the looped subcomponent with <tab-content></tab-content> element!
Here a my component template

 <form-wizard ref="notificationForm"
                shape="circle"
                stepSize="xs"
                color="#3498db"
                title="Fiche de notification"
                :subtitle="epid"
                start-index.sync="stepIndex"
                nextButtonText="Suivant"
                backButtonText="Précédent"
                finishButtonText="Terminer"
                @on-error="handleErrorMessage"
                @on-complete="onComplete"
                @on-change="onChange">
    <tab-content v-for="(fieldset, index) in form"
                    :index="index"
                    :title="fieldset.label"
                    :key="fieldset.name"
                    :before-change="validateAsync">
        <b-alert variant="danger"
                    :show="errorMsg !== null">
            <p v-html="errorMsg"></p>
        </b-alert>
        <div class="row">
            <section-input v-for="input in fieldset.items"
                            :key="input.id"
                            :input="input">
            </section-input>
        </div>
    </tab-content>
</form-wizard>

Hope it helps

@dany-eudes
Copy link

Thank you, @mdjaman! We all appreciated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants