Closed donlent closed 1 year ago
@adamdriscoll as always thanks a lot for taking care of that in the next milestone. :-D Additional Information which hopefully could help resolving this issue in a more clean way: I think remembering only the -DisablePrevious setting is maybe not enough. You should also remember the "OriginatingStep". Let's say somebody will just jump from step 1 to 4 but does not disable the previous button... when you click back you should be transported back to the originating step and not to via step 3 and 2... and this even if you continue to step 5, 6, ... whenever you go back and reach step 4 again, from that moment when he hits the back button he should always jump to step 1...
@donlent I'm still looking into this, but this has to be my favorite example for a bug ever haha. Thanks. It makes it much easier.
Hey @adamdriscoll π€£ really, you probably don't even know how much I do appreciate your work and efforts that you put in your already so great product (I really mean it! ;-) ) So thanks a lot!!! πReally looking forward to the (hopefully π ) solution to that.
Ps. If you ever step-by in Switzerland PLEASE let me know so that we can arrange something and at least invite you for a lunch or so... π€
First awesome repro steps thank you. We ended up adding -DisablePrevious to the New-UDStep since the onvalidatestep logic only is looking at the next step and not back. Having the switch on the step itself will help you lock the step down and not have to have login in validation for it. This is currently in the 3.8 branch
Hey @mattselle Thanks to you mate! Really appreciate your efforts that you put on this one and I'm certainly happy with your solution. ππ At least it won't break the logic anymore now... The second suggestion was just to make it even more "flawless" if you want but it's certainly not necessary... π
Ps. My invitation for a lunch is obviusly also valid for you! π€ THANKS!!!
Hi @mattselle I finally had the possibility to test this new feature in 3.8. Thanks a lot. This actually works but it implicitly limits me if I have other steps that would require the ability to go back. Means, that if I disable the step itself, no matter which step I used orinally, once I reach the one that has this property set, it won't allow me to go back.
So I'm asking you for a little improvement if possible. Could you please add the possibility to use Set-UDElement on a Step as well? This seems to not be possible right now.. But what I would like to do is this:
I'd like to perform the following inside of the OnValidateStep:
Set-UDElement -Id 'myStep' -Properties @{
DisablePrevious = $true
}
If I can do that after having checked that the CurrentStep is xyz, then I'm fine... Like that the "DisablePrevious" only gets applied when a particular Validation condition is met.
Does this make sense? :-)
Would really be awesome!
Thanks a lot for your efforts!!
Best regards, Don
Dear @adamdriscoll, @mattselle Do you prefer that I open a new issue for this? Maybe it's easier for you to keep track instead of reopening closed issues? Thanks in advance!
Let's open a new one for the Set-UDElement
Steps to Reproduce
Here's a fully functional code that demonstrates the issue. I think that when a step gets disabled, because of a Validation Condition met, then the stepper should "remember" that and not allow to jump into a step that you don't want...
Expected behavior
Actual behavior
Environment data
3.7.9
Visuals
No response