glhd / alpine-wizard

Multi-step wizard helpers for Alpine.js
MIT License
149 stars 3 forks source link

x-wizard:step not working inside alpine for loop #6

Open sanderjongsma opened 2 years ago

sanderjongsma commented 2 years ago
<template x-for="step in configuratorData.steps">
    <div x-wizard:step>
        <span x-text="step.name"></span>
    </div>
</template>

<div x-wizard:step>
    step outside for loop
</div>

I want to display steps dynamic based on configurator data. But it makes 3 steps but with all the step data in each step. The step outside the loop works fine. I made a gif to make it more clear. In the screenshot is the html output. Am I doing something wrong.

image

wizard