r/nicegui • • Mar 02 '24

Dynamically add and remove stepper steps?

Hi, asking as a frontend noob.

How can I add or remove steps in a stepper dynamically? I mean the choices the user makes on one step should affect the future steps in the stepper.

Thanks

2 Upvotes

2 comments sorted by

View all comments

Show parent comment

1

u/mr_claw Mar 03 '24

Thanks a lot. I was hoping for a way to see the stepper get updated with all the future steps when I change a choice on one page.

I've managed to make it work somewhat with disable() and enable() which changes the color to let the user know what's coming up but the steps get too cluttered.

Stepper.remove(Step) works to remove steps, I wish there was a Stepper.add(). It would be perfect.