File tree Expand file tree Collapse file tree 2 files changed +17
-22
lines changed
CodeBeam.MudBlazor.Extensions/Components/Stepper Expand file tree Collapse file tree 2 files changed +17
-22
lines changed Original file line number Diff line number Diff line change 7171
7272 @if (! DisablePreviousButton && ActiveIndex != 0 )
7373 {
74- if (ActiveIndex < Steps . Count && Steps [ ActiveIndex ]. Status != StepStatus . Continued || showResultStep )
74+ if (IconActionButtons || MobileView )
7575 {
76- < MudIconButton Color = " @Color" Variant = " @Variant" Icon = " @Icons.Material.Filled.ChevronLeft" OnClick = " @(() => SetActiveIndex(-1))" / >
76+ < MudTooltip Text = " @LocalizedStrings.Previous" Delay = " 300" >
77+ < MudIconButton Color = " @Color" Variant = " @Variant" Icon = " @Icons.Material.Filled.ChevronLeft" OnClick = " @(() => SetActiveIndex(-1))" / >
78+ < / MudTooltip >
7779 }
7880 else
7981 {
80- if (IconActionButtons || MobileView )
81- {
82- < MudTooltip Text = " @LocalizedStrings.Previous" Delay = " 300" >
83- < MudIconButton Color = " @Color" Variant = " @Variant" Icon = " @Icons.Material.Filled.ChevronLeft" OnClick = " @(() => SetActiveIndex(-1))" / >
84- < / MudTooltip >
85- }
86- else
87- {
88- <MudButton Color =" @Color" Variant =" @Variant" OnClick =" @(() => SetActiveIndex(-1))" >@LocalizedStrings.Previous </MudButton >
89- }
82+ <MudButton Color =" @Color" Variant =" @Variant" OnClick =" @(() => SetActiveIndex(-1))" >@LocalizedStrings.Previous </MudButton >
9083 }
9184 }
9285
132125 {
133126 if (ActiveIndex < Steps .Count && Steps [ActiveIndex ].Status != StepStatus .Continued )
134127 {
135- < MudIconButton Color = " @Color" Variant = " @Variant" Icon = " @Icons.Material.Filled.ChevronRight" OnClick = " @(() => SetActiveIndex(1))" / >
128+ if (IconActionButtons || MobileView )
129+ {
130+ < MudTooltip Text = " @GetNextButtonString()" Delay = " 300" >
131+ < MudIconButton Color = " @Color" Variant = " @Variant" Icon = " @Icons.Material.Filled.ChevronRight" OnClick = " @(() => SetActiveIndex(1))" / >
132+ < / MudTooltip >
133+ }
134+ else
135+ {
136+ < MudButton Color = " @Color" Variant = " @Variant" OnClick = " @(() => SetActiveIndex(1))" > @GetNextButtonString ()< / MudButton >
137+ }
136138 }
137139 else
138140 {
Original file line number Diff line number Diff line change @@ -381,19 +381,12 @@ protected bool IsStepActive(MudStep step)
381381
382382 protected int CompletedStepCount ( )
383383 {
384- return Steps . Where ( x => x . Status != Enums . StepStatus . Continued ) . Count ( ) ;
384+ return Steps . Count ( x => x . Status != StepStatus . Continued ) ;
385385 }
386386
387387 protected string GetNextButtonString ( )
388388 {
389- if ( Steps . Count - 1 == CompletedStepCount ( ) )
390- {
391- return LocalizedStrings . Finish ;
392- }
393- else
394- {
395- return LocalizedStrings . Next ;
396- }
389+ return ActiveIndex >= Steps . Count - 1 ? LocalizedStrings . Finish : LocalizedStrings . Next ;
397390 }
398391
399392 protected internal bool ShowResultStep ( )
You can’t perform that action at this time.
0 commit comments