stepTerm in <Step> not working as expected
Current Behavior
The step term property in
<Stepper stepTerm='TestStep'>
<Step stepTerm='OtherTestStep'>
<svelte:fragment slot="header">(header)</svelte:fragment>
(content)
</Step>
<Step stepTerm='AnotherTestStep'>
<svelte:fragment slot="header">(header)</svelte:fragment>
(content)
</Step>
</Stepper>
as specified in the documentation but the Step just shows "TestStep" and not "OtherTestStep" or "AnotherTestStep". Is this an issue or am I doing something wrong
Expected Behavior
I expect to be able to overwrite the stepTerm for each step seperately.
Steps To Reproduce
No response
Link to Reproduction / Stackblitz
No response
More Information
No response
@SK4P3 yeah looks like a misunderstanding of how the prop is used in the child items. The source might help:
- https://github.com/skeletonlabs/skeleton/blob/master/packages/skeleton/src/lib/components/Stepper/Step.svelte#L118
- https://github.com/skeletonlabs/skeleton/blob/master/packages/skeleton/src/lib/components/Stepper/Step.svelte#L122
So essentially the only place stemTerm is used within the item is in the header/content slot default values. Since you're setting your own header/content slot content, this will not be visible.
You may be expecting stepTerm to carry up to the parent Stepper, which is not (and likely never will be) the case.
That said, we do have plans to revisit the Stepper component in the future. If you have a use case for this, then suggestions are welcome here:
- https://github.com/skeletonlabs/skeleton/issues/1780
Thanks for the answer!