Topic: Stepper - remain on current step

Boutrois priority asked 4 years ago


Expected behavior I am using the stepper add-on with a data-feedback function on one of the steps NEXT button. Depending on some conditions, I want to remain on current step instead of moving to the next. Please find my code below. The move to next steps works well but staying on the current one does not, an infinite timer is displayed.

Actual behavior

Resources (screenshots, code snippets etc.)

Next button HTML code:

<button class="btn-md px-3 waves-effect waves-dark next-step" data-feedback="moveToStep3">NEXT</button>

Feedback function JS code:

function moveToStep3() {
var test = true;  //simple variable to simulate my testing conditions
if(test) {
  $('#horizontal-stepper').prevStep();      
  //THIS DOES NOT WORK, INFINITE TIMER DISPLAYED. I NEED THE STEPPER TO STAY ON CURRENT STEP IF test IS TRUE
} else {
  $('#horizontal-stepper').nextStep();   //THIS WORKS
}

}


Mateusz Łubianka staff commented 4 years ago

Hi @Boutrois,

You're right. It is something wrong in this case so I will create a task with this issue and our team will check it as soon as possible.

Best,


henrik pro commented 4 years ago

Any updates to this. I am experiencing the same issue?


Grzegorz Bujański staff commented 4 years ago

Unfortunately not. This solution is still not supported.


scottwilliams priority commented 4 years ago

data-feedback is still broken in 4.19.1


Grzegorz Bujański staff commented 4 years ago

Hi. Sorry for that, we will fix it as soon as possible.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB jQuery
  • MDB Version: 4.12.0
  • Device: Mac
  • Browser: Chrome
  • OS: Mac OS
  • Provided sample code: No
  • Provided link: No