Skip to content

Commit

Permalink
fix(bal-tabs): create separate numberation for o-tabs based on indepe…
Browse files Browse the repository at this point in the history
…ndent varaiable
  • Loading branch information
predrag-arsic committed Oct 6, 2022
1 parent 3c44f25 commit 461b5f9
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ const stepItemButtonLabelEl = stepItemButtonEl.element('label')

export const StepList: FunctionalComponent<TabProps> = ({ value, float, clickable, tabs, onSelectTab }) => {
let hasPassed = true
let index = 1

tabs = tabs
.map(tab => ({ ...tab, active: tab.value === value }))
.map(tab => {
Expand All @@ -28,7 +30,7 @@ export const StepList: FunctionalComponent<TabProps> = ({ value, float, clickabl
...stepsEl.modifier(`float-${float}`).class(),
}}
>
{tabs.map((tab, index) => (
{tabs.map(tab => (
<li
class={{
...stepItemEl.class(),
Expand Down Expand Up @@ -80,7 +82,7 @@ export const StepList: FunctionalComponent<TabProps> = ({ value, float, clickabl
}}
style={{ display: !tab.done ? 'block' : 'none' }}
>
{tab.failed ? '!' : index + 1}
{tab.failed ? '!' : tab.hidden ? index : index++}
</span>
</span>
<span
Expand Down

0 comments on commit 461b5f9

Please sign in to comment.